okay i know how to use fstream and everything, but the prolem is that I want to use a variable in ithe open part.
exp const.
pretend all headers are included.
It works like this
{
...
ifstream infile;
infile.open("text.txt");
...
}
but when I want to use a variable for the file it will read it does not work/
exp. using variable
{
...
ifstream infile;
string text = "text.txt";
infile.open(text);
...
}
it does not work, any helpful hit please.