hi, I am new to C++ but have programmed in C# and java before. so far i get the basics of C++.
my problem is when i want to write a file use;
#include <fstream>
void main()
{
ofstream ofs("file.txt");
//so on so forth.
}
what i want to be able to do is something like:
string fileLoc;
cin >> fileLoc;
ofstream(fileLoc);
//and again...
problem is that ofstream takes a const *char (I think? -pointers like this are new to me-).
is there anyway to achieve this preferably without using something too platform dependant.
thanks for your time.
great thanks. (there will be more questions to follow :D)