Command prompt

When command prompt is opened, is the code that is typed in in C++, or C or some other one??? Or can you use all of them?

Thank you
closed account (3qX21hU5)
Here you go - http://lmgtfy.com/?q=how+to+use+command+prompt

Sorry just had to ;p But to kind of answer your question, it is generally referred to as MS-DOS which isnt really a programming language.
Last edited on
It technically can be a programming language, because you can make batch files from it, which is just a set of commands to be executed in order. You can write a whole lot of cool things using batch scripts. I would probably loosely classify it as a programming language. You can't do nearly as much with it as you can with C/++, though.

But yeah, it's referred to as MS-DOS. Really what it does is just call on external programs and passes them your input, with the exception of a few commands and syntax that is build in (like dir, pause, piping output, etc.)
To answer your second question, you cannot enter C/++ (or any other language) into the command prompt directly and expect it to work.
Last edited on
Alright, but is it easy to learn how to use this? Is it easier than C++?
Command Prompt prompts you for commands. Unfortunately, very few people have successfully typed in "take over the world for me" and gotten the results they wanted. You can, however, be a caring person, and ask it to "help".

Edit: Ypu posted while I was typing. The syntax depends on what program you use so it probably is more difficult to memorize than C++.
Last edited on
@OP
If you're looking to write actual programs, one's that are installed, and executed (games, word processors, media players, etc etc.) then you need to learn something other than how to use MS-DOS commands. I think you've misunderstood what I meant when I said it was a programming language. It's loosely a programming language. C++ is much more valuable to learn, and you'll probably pick up MS-DOS commands along the way (with the inevitable use of system())

@L B
Google might prove more effective, as it's already trying to take over the world.
Personally, if Google is more stable than and offers better services than the government, I'm all for a Google takeover. With terms and conditions, of course.
Thanks everyone.

Just to let you know, you can watch STAR WARS on command prompt!!!
Its amazing.
Just type it into google and you will figure out how to do it.
Telnet, not command prompt, and it's only the first half of it in ASCII art. That silly blinkenlights.nl...
Last edited on
I wouldn't really call the windows command prompt a programming language. There are shells out there in the *nix community that are considered programming languages.

I personally can't stand windows command prompt. All I ever use it for is ping and tracert. Anything else I use bash.
I do have a questions, though, why does Windows commonly use / for commandline options, and other platforms/programs use - for commandline options? Why do some use -- for some options and - for others?
Last edited on
Why do some use -- for some options and - for others?
IIRC the -- is for the long name of the switch while - is for the short, for example --help or -h
@L B
It's all at the discretion of the programmer to choose which tags (/, -, --) to use. You could write a program that accepts ~<option> as a valid argument. The creator of telnet could just has easily decided to use tildes.
However, the convention is to use slashes and hyphens, and i suppose Microsoft just decided they liked slashes better.
DOS Batch is a programming language, an old kind called a batch script. (Hence its name.) It is implemented by the cmd.exe shell.

You can do many, many cool things with DOS batch, but as was mentioned, this is (mostly) due to other programs on the system. The current (modern) version of the shell has some cool powers that you used to have to use other programs to do, such as math and string partitioning and explicit subroutines.

As for ease of use and its learning curve, stick with C++. DOS batch is an ancient design and a very brutal beast to tame.

@LB
If I remember correctly, command options were modeled after CP/M command switches.
Topic archived. No new replies allowed.