fstream Gated(nameToCheck,ios::in);
if (Gated.fail()) //File is created
{
cout << "blahblahblah, " << ask4Id.geFileName() << "?\n";
Gated.open (nameToCheck,ios::out);
cout << "blahblahblah!\n";
Gated << "test";
Gated.flush();
return 0;
Can someone help me figure why "test" isnt being copied to Gated?
I've tried chaning it in many ways, this is just my latest one, and still cant get it to work...
I know its something to do with this bit of code, because everything else works perfectly, and the file even does get created with the correct name...
Actually, you solved my problem =p
it seems i had forgotten to clear the error flags, and for some reason that didnt allow me to copy "test" into the file...
Thanks, at last i can continue with the code (and with the learning)~