Jump to content
  • Advertisement

Archived

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

vbisme

Command Prompt

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

Does anyone know where to get infomation on implimenting a command prompt in a program. Instead of having a menu for the user to press 1, 2, or 3, they would type in a command. Like MySQL and others programs.

Share this post


Link to post
Share on other sites
Advertisement
Within my program, I want to allow users to perform certain actions. Instead of displaying a menu saying "Press 1 to do this" or "Press 2 to do this" I want to be able to allow the users to type in the commands.

Other than scanning and testing strings. Are the more efficient methods?

By the way, how would you clear the screen and such?

Share this post


Link to post
Share on other sites
Nothing is MORE efficient than string scanning, (I assume you mean prarsing) and for clear screen: (The cheesy way)

  
int a;
a=1;
while (a<=20){

cout << "\n";
a++; }


Either, string parsing is easier in C/C++ than in any other language in my opinion. (None of those clunky functions...)

Share this post


Link to post
Share on other sites
I would like to take control of the screen allow me to put the cursor where I want and not just have the scroll down type comannd prompt. Like in DOS the cls command clears the screen and put the cursor at the top. Any tip?

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!