64,639
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
using namespace std;
int main(){
char p[5] = { 0x1, 0x2, 0x3, 0x4, 0x0 };
string q;
q = p;
cout <<q.c_str();
return 0;
}
string& append (const char* s, size_t n);
char p[5]={0x1,0x2,0x3,0x4,0x0};
string q;
q.append(p,5);