Why does c++ have to be so finnicky about strings? I've looked everywhere but found nothing on how to get ifstream to open a file from user input. Can you guys help me? I want this code to work but it just isn't happening. How can I make it work?
i don't know sepples, because sepples is crap.
but if you're getting the file name from stdin trying taking off the trailing newline character (replace it with null).
Name:
Anonymous2009-10-27 0:49
trailing newline character?
Name:
Anonymous2009-10-27 0:56
>>5
if it's not there then that means cin removes it and you should look for a different reason for your problem.
Name:
Anonymous2009-10-27 1:00
no it's not a problem with what the user inputs, it's a problem with the code. it won't compile like that.