Now, i know how to create files in C++... but how do i create a file with the name the user wants?
eg. ifstream f1 ("Userschoice");
Note: i'm using Borland Turbo C++ 3.0 DOS
Printable View
Now, i know how to create files in C++... but how do i create a file with the name the user wants?
eg. ifstream f1 ("Userschoice");
Note: i'm using Borland Turbo C++ 3.0 DOS
This should work:
That should work.........Code:ifstream(gamedata)
istream("gamedata",ios::in)
if (gamedata)
{
load >> stuff;
}
Quantrizi: i dont think that is what he wants :)
this should do what you want..
Code:ifstream fin;
char fname[12];
cin.getline(fname,12,'\n');
fin.open(fname)
--
--