討論串[問題] 為什麼我無法使用atoi(c語言)
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者wowtiger (小虎)時間16年前 (2009/06/14 22:52), 編輯資訊
0
0
0
內容預覽:
char* itoa( size_t value ) {. static char buffer[32];. char* text = buffer + 31;. do {. *--text = value % 10 + '0';. } while( value /= 10 );. return t
(還有48個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者t5378060 (gyfatty)時間16年前 (2009/06/14 11:36), 編輯資訊
0
0
0
內容預覽:
#include <iostream>. using namespace std;. main(). {. char *a="123";. int s=atoi(a);. cout<<s+2<<"\n";. cout<<a+1<<"\n";. system("PAUSE");. }. --.

推噓4(4推 0噓 3→)留言7則,0人參與, 最新作者dodomax (肥狗)時間16年前 (2009/06/13 21:09), 編輯資訊
0
0
0
內容預覽:
我有include stdio.h也有stdlib.h. 可是用itoa會產生錯誤訊息. 只能改用spintf. 可是我還是不太懂為什麼我無法使用itoa?. --. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 61.229.25.63.
首頁
上一頁
1
下一頁
尾頁