Hey there, I'm back again.
Well, I've finally finished my c++ book but it leaves LOTS of things unanswered such as how to work with files so I'm kind of winging it from other source code I've been looking at over the past few days.
What I'm now trying to do is to make a settings file, well, for now just a text file that is made based on the last line of a record file. Kind of a loop but with files?, anyways, here's the code I've made and if anyone would be kind enough to tell me what I'm doing wrong it would be appreciated!
As you can see there is errors with the makeFile.open(fn). I know (think) I have to use string for this but I get errors that it can't convert std::char amongst others if I try to change it.
using namespace System; // for later
using namespace std;
int main(int argc,char *argv)
char* Title = "data_";
char* Ext = ".dat";
int i = 1;
fileTitle << Title << i << Ext << "\n";
ifstream fileTitleA ("file.log");
cout << line << endl;
fn = line;
//Make file based on file.log's contents (Can't get this to work)
makeFile.open (fn); //Pointer or static_cast here?
makeFile << fn << "\n";
cout << "\n" << "fn = " << fn << "\n"; // Just for test purposes
system("pause"); // should be using cin.get() I know, just found out :)
Also, Now that I've finally finished basic c++
(and if/ofstream wasn't included, or how to use any of the libraries) so, where do I go now? I can't find any books and very much NEED to learn more!
Thanks for your help,
<<The not so newbie newbie lol>>