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:26

>>5
Go eat a dick you fucking cretin, god damn you and everything you ever loved.
I cannot believe this shit, you are willing to help a mentally ill faggot, you provide him with solutions to solve just one a-few of his problems, and in return, in exchange, the ungrateful fuck tells you to suicide.
I'm so fucking angry right now that slaughtering a hundrend babies seems like a viable option.
Kill yourself, asshat, I didn't ask for an english lession,
English* lesson*.
What you asked for is irrelevant.
If it really pisses you off that much, don't answer.
Well, if correcting your English pisses you off that much, don't post. Oh, wait. Fuck YOU.
Fucking piece of shit motherfuckerfuck.

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