convert between char* and std::string
摘要:
char* to std::string std::string has a constructor for this: const char *s = "Hello, world!";std::string str(s); note: Make sure thar your char* isn't NULL, or else the behavior is undefined. if you already know size of the char*, use this insteadchar* data = ...;int size = ...;std::st 阅读全文
posted @ 2012-06-27 07:46 深圳彦祖 阅读(3241) 评论(0) 推荐(0) 编辑