Jump to content
  • Advertisement


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


...file not opening

This topic is 6509 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!