2004/11/17 下午 10:08:43 atoi(str) 是將數值字串轉換成整數。你的問題是將字串中的某一字元轉成數值 當然你要確定轉換的要是0-9。試用: int trans=input[i]-'0'; Or int trans ...
www.programmer-club.com.tw