Hi! Can anyone please tell me how can I make this code work?
Basically it's just a program which creates a file.
1 2 3 4 5 6
FILE * pFile;
string filename;
cout << "Name the project" << endl;
cin >> filename; // This gets the name of the file you want to create.
pFile = fopen (filename,"w"); // This creates the file, but fails.
cannot convert parameter 1 from 'std::string' to 'const char *'