ofstream cldb(nick, ios::noreplace);
cldb<< nick << "\n" << name << "\n" << older << "\n" << live << "\n" << city << "\n" << info;
cldb.close();
Can someone say why this doesn't work?
if i make a cout << cldb; it say "0x0" only...
Thanks...
ofstream cldb(nick, ios::noreplace);
cldb<< nick << "\n" << name << "\n" << older << "\n" << live << "\n" << city << "\n" << info;
cldb.close();
Can someone say why this doesn't work?
if i make a cout << cldb; it say "0x0" only...
Thanks...
ALWAYS check if a file succeeded in opening
Code:std::ofstream WriteFile; WriteFile.open(FileName, std::ios::out | std::ios::noreplace); if(WriteFile.good()) { WriteFile << Stuff << ...; WriteFile.close(); }
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.