struct file
{
int id;
string name;
int pid;
};
vector<file> file_to_vector;
string str;str = file_to_vector[0].name;
CString cstr;
cstr.Format ("%s",str.c_str());
cout << str << endl;
cout << "HELLO" << endl;
cout << cstr << endl;
cout << "HELLO" << endl;
输出:
A
HELLO
A
HELLO