首页 > 代码库 > std::vector<char> 转 const char

std::vector<char> 转 const char

std::stringstream oss; 
for(unsigned int i=0;i < buffer->size();i++){ 
oss<<(*buffer)[i]; 

string temp=oss.str(); 
const char * buf=temp.c_str(); 

std::vector<char> 转 const char