Menu

Console Functions??

Mr. Chris
2009-05-03
2012-09-26
  • Mr. Chris

    Mr. Chris - 2009-05-03

    How do make a shell or command prompt? Can some list all the functions and commands related? I am using C.

     
  • anonymous nobody

    Do you mean how do you run cmd commands on Windows within a C program?

    #include <cstdlib>
    int main() {
        system("COMMAND_GOES_HERE");
        return 0;
    }
    

    Or do you mean just a console application? If the latter, the Dev-C++ help
    file comes with a tutorial.

     
  • cpns

    cpns - 2010-01-30

    It is entirely unclear what you are asking.

    A "shell or command prompt" itself is just a console mode program that accepts
    user commands and executes them. What exactly are you having trouble with?

    Regarding Drmoo's answer, if that is what you meant, then depending on the
    level of control you want, you can use system() as already suggested, or for
    more control use one of the spawn family of
    functions

    If you want to know what commands are available in the Windows command
    console, then enter the "help" command at the console, and it will list them.
    Enter help followed by a specific command you get more help on that one
    command. Other than that you can also launch any executable from the command
    shell.

     
  • laxman varada

    laxman varada - 2010-08-16

    hi,

    what commands are available in the Windows command console, then enter the
    "help" command at the console, and it will list them,Other than that you can
    also launch any executable from the command shell.

    thank u

    regards,
    phe9oxis,
    http://www.guidebuddha.com

     

Log in to post a comment.