經安全檢測,此網站為安全網站,請放心前往原始網址!

關於字串轉整數 / C++ Builder / 程式設計俱樂部

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

www.programmer-club.com.tw

網址安全性掃描由 google 提供