Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


...file not opening

This topic is 6592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

for some reasson the file isnt opening.. #include fstream.h; #include iostream.h; //the above have the greater more and less than signs around them is just that if i put the signs.. the stuff inside them dissapear ofstream writefile; void datfile() { writefile.open("scores.dat", ios::out); writefile << "High Score" <

Share this post

Link to post
Share on other sites
void datfile()
ofstream writefile("scores.dat");
writefile << "High Score";

//note use: ofstream writefile("scores.dat",ios::app); to appened to a file

also iostream.h is include in fstream.h so you only to include fstream.h

hope this helps

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!