博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2008年7月16日

摘要: 很有用的,所以把它记下来 1 CString,int,string,char*之间的转换 string 转 CString CString.format("%s", string.c_str()); char 转 CString CString.format("%s", char*); char 转 string string s(char *); string ... 阅读全文

posted @ 2008-07-16 18:28 浪端之渡鸟 阅读(2125) 评论(6) 推荐(0)

摘要: str.erase(remove_if(str.begin(),str.end(),ptr_fun(isspace)),str.end()); 谁有更好的可以发上来丫 求去左右空格的代码。 TCHAR tempName[256]={0}; TCHAR tempType[256]={0}; fscanf(fp,"%s",temp);//得到字段名字 //contin... 阅读全文

posted @ 2008-07-16 15:08 浪端之渡鸟 阅读(926) 评论(1) 推荐(0)

摘要: 下面的是学C++时要注意的。绝对经典。!! 1.把C++当成一门新的语言学习(和C没啥关系!真的。); 2.看《Thinking In C++》,不要看《C++变成死相》; 3.看《The C++ Programming Language》和《Inside The C++ Object Model》,不要因为他们很难而我们自己是初学者所以就不看; 4.不要被VC、BCB、BC、MC、TC... 阅读全文

posted @ 2008-07-16 12:51 浪端之渡鸟 阅读(281) 评论(0) 推荐(0)

摘要: basic_string::max_size 返回string 能放的最大元素个数。(不同于capacity) size _ type max _ size( ) const; basic_string ::size_type cap, max; cap = s.capacity ( ); max = s.max_size ( ); // max=4294967294. basic_s... 阅读全文

posted @ 2008-07-16 09:29 浪端之渡鸟 阅读(29133) 评论(0) 推荐(0)