Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Naming a Text file in C++

Name: OP !ewz/7gcXdY 2008-05-13 23:46

I am working on a small project, and I need to be able to let the user name there txt file. I have tried many things, none have worked.

Also, I'm not exactly the best C++ programmer, so if you could, please explain your answers with a lot of detail.

But what I want is:

char filename;
cin>>filename;
ifstream inputFile;
inputFile.open(filename, ".txt", ios::in);

Obviously, the last line of code is wrong, but thats what I would like to work. I have tried:

strcat(filename, ".txt");
inputFile.open(filename, ios::in);

And it did not work either.

Name: Anonymous 2008-05-14 0:03

>>3
Kill yourself, asshat, I didn't ask for an english lession, just some C++ help. If it really pisses you off that much, don't answer. And with that said, thank you for answering. And again, kill yourself.

>>4
Thank you.

>>2
>>3
12am, have to be up in 5 hours for finals, I think english is the least of my worries right now.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List