Jump to content
  • Advertisement
Sign in to follow this  
t5hoo6

Dose anyone know this?

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

Advertisement
To open files and read the contents, use fopen.
ex:

FILE* fp = fopen("hello.txt", "r");
assert(fp != null);
/* do stuff with the file */
fclose(fp);



To run programs that is platform depedent. Usually something along the the lines of system("notepad.exe") will work.

Share this post


Link to post
Share on other sites
Quote:
Original post by t5hoo6
I need to run a BATCH file (.bat) and none of the things yal' gave me worked.


Umm in Unix/Linux? You could try using system to execute it, but not sure how that's done on that platform. Give it a look though! BTW, I though .BAT files were something doe Dos/Windows? I might be mistaken though, so excuse my lack of knowledge in the *nix area [wink]

Share this post


Link to post
Share on other sites
Quote:
Original post by t5hoo6
How about how do you clear the screen my compiler cannot use CLS?


system("clear"); is the *nix version IIRC.

Share this post


Link to post
Share on other sites
Escape sequences are just as system-dependent as system(). They won't work on the default Windows console for example.

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.

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!