• 0

c++ IfStream


Question

Hello, i have this code in my c++ program : ifstream myfile("lala.txt");

I want my code to allow the user to enter a file name ( string fname ). However when i use the code like this ( ifstream myFile(fname); ), i recieved compiler errors. Is there any proper way of doing this ?

Thanks in advanced.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.