摘要: 从INT 到STRING的几种方法1. int sprintf( char *buffer, const char *format [, argument] ... ); <stdio.h>例如: int ss; char temp[64]; string str; ss = 1000; sprintf(temp, "%d", ss); string s(temp); //调用string的方法 cout<<s.c_str()<<endl;//1000 cout<<s.size()<<endl; //长度为42.c 阅读全文
posted @ 2012-10-15 17:51 不想当元帅的好兵。 阅读(124) 评论(0) 推荐(0) 编辑