Jump to content
  • Advertisement

Archived

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

Yratelev

ofstream in .net

This topic is 5230 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

Hi, In VC++ 6.0 I used the class ofstream in FSTREAM.h, but now when i convert my projects to solutions in VC++.net it doesnt recognise the ofstream class anymore, and im wondering which class do i use just to produce a simple text file like: newofstream bob; bob << "text goes in here" << "\n"; Thanks Yratelev

Share this post


Link to post
Share on other sites
Advertisement
the standard library components exist in namespace std. So, you either qualify your uses of them(std::ofstream), or you import certain names(using std::ofstream), or you import the whole namespace(using namespace std

Share this post


Link to post
Share on other sites
Also, you shouldn''t include <fstream.h>, MSVC .NET doesn''t play well with that. Instead use <fstream>.

Share this post


Link to post
Share on other sites
.Net complies to the newest standard of C++.

This means learn namespaces ... dammit !

"Arguing on the Internet is like winning in the Special Olympics, in the end, you''''re still retarded"

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!