http://blog.csdn.net/pipisorry/article/details/39076957
#include <iostream> #include <sstream> #include <string> using namespace std; void main(){ int i = 65; cout<<char(i)<<endl; //输出‘A' <=>printf("%c\n", i); stringstream ss; ss<<i; string s; ss>>s; cout<<s<<endl; //输出”65“ char *c = new char; itoa(65, c, 10); cout<<c<<endl; //输出”65“ //cout<<strcmp(c, "65")<<endl; }
from:
http://blog.csdn.net/pipisorry/article/details/39076957
ref:
http://bbs.csdn.net/topics/390401758?page=1#post-394058528
时间: 2024-10-08 09:05:03