what is the difference between DOS, MSDOS and CommandPrompt? |
It's probably easier to describe what they are.
MS-DOS is a 16bit single user/single tasking operating system developed in the 80s to run 16bit PCs. It is a text based operating system.
DOS is a synonym for MS-DOS. The actual name is not relevant to this use.
Command Prompt is the console shell in Windows. It's a Windows application that simulates the MS-DOS environment. It's beefed up a little, so it a bit nicer to use than MS-DOS ever was.
i would like to learn how to do this! |
Here's a command list. You might have to search for a tutorial.
http://ss64.com/nt/
id like to know how compiling from the Command Prompt works. |
Your Visual Studio installation will provide an environment variable that points to the installation. You can see environment variables by typing
set
.
The computer I'm using has Visual Studio 6, 2005, 2008 & 2010 installed and my environment has these variables:
1 2 3 4
|
VS100COMNTOOLS=C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\
VS60COMNTOOLS=C:\Program Files\Microsoft Visual Studio\Common\Tools
VS80COMNTOOLS=C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
|
Let's say I wanted to use Visual Studio 2005 to compile a program, here are the steps.
1. Type
"%VS80COMNTOOLS%vsvars32.bat"
This sets up the necessary environment variables that you need to use Visual Studio 2005.
2. Type
notepad hello.cpp
3. Enter this program into notepad and save and exit when done.
1 2 3 4 5 6 7
|
#include <iostream>
int main()
{
std::cout << "hello world" << std::endl;
return 0;
}
|
4. Type
cl hello.cpp
This compiles the code.
5. Type
hello
This runs the program.