char **argv;
vector< vector< char > > vvc;
vector< char* > vcp;
vector< char > vc;
string str;
str = "a.out";
vc.assign(str.begin(), str.end());
vc.push_back('\0');
vvc.push_back(vc);
str = "arg1";
vc.assign(str.begin(), str.end());
vc.push_back('\0');
vvc.push_back(vc);
str = "arg2";
vc.assign(str.begin(), str.end());
vc.push_back('\0');
vvc.push_back(vc);
for (int i = 0; i < vvc.size(); ++i)
{
vcp.push_back(&vvc[i][0]);
}
argv = &vcp[0];