Now we are getting somewhere. In VC++, you create a project. You add your source and header files to that project. To get a program from the source code, you must build the project. A solution is like a workspace that holds one or more projects, and if you've created a project a solution should be created for you. So to get a program you should go to Build->Build Solution, and it will automatically compile all the source files in the project and then link them together. Unfortunately, it sounds like you haven't added your source file to your project. That might have been my fault because earlier I was under the impression that it would add it to the project automatically.
So from the beginning follow these steps (Note, this is from VC++ .NET 2003, 2005 is similar but not necessarily exact):
* Open Visual Studio. If any solution opens automatically, close it.
* Go to File->New->Project...
* Under Visual C++ Projects->Win32 select Win32 Console Application.
* Enter your project name and location, click OK.
* In the wizard that appears, switch to Application settings and check the Empty project option. Click Finish.
* Go to File->Add New Item...
* Under Visual C++ select C++ File (.cpp).
* Type in a file name, click Open.
* In that file, add the code below:
* Save the file (Ctrl-S).
using namespace std;
cout << "Hello World.";
* Go to Build->Build->Solution to build the solution.
* The output should look something like this:
* Go to Debug->Start Without Debugging to execute the program (Ctrl-F5).
------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
Build log was saved at "file://c:\My Solutions\HelloWorld\Debug\BuildLog.htm"
HelloWorld - 0 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 1 succeeded, 0 failed, 0 skipped
I think the problem was just that the file wasn't added to your project, so when it built the project it didn't do anything. Just a minor detail that makes a big difference.