Jump to content
  • Advertisement
Sign in to follow this  
frogtag

streams

This topic is 2990 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 can anyone tell me how I would physically open a text file using istream/ostream etc... I don't me open it to read but open the text file as if i had double clicked on the file icon?

Share this post


Link to post
Share on other sites
Advertisement
Depends on which OS you're using. To get the behavior of double-clicking on a file is OS specific and nothing in the C++ (I'm assuming you're talking C++ here since you mentioned istream/ostream) standard library is going to do that for you. Look into the Win32 APIs (assuming you're on Windows) for what you want.

Share this post


Link to post
Share on other sites
Quote:
physically open a text file

I do not recommend this. Last time I've tried to do that my hard disk was screwed.


Seriously: clicky. First result.

Share this post


Link to post
Share on other sites
From your last sentence, it sounds to me like you're actually wanting to open the text file in the default program assigned to the file (e.g. Notepad). Is that the case? If so, it has nothing to do with istream/ostream.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!