Hello World from tuts

Hi ,
I've read every post on this topic and I have some questions.

Has anyone ever got this simple program to work?

Ive tried to compile and run it (as a console app) in the following.
Dev++...It gave me a bunch of errors.
Micro visual basic 08 ...same
Micro visualc# 08........same
Borlandc++ compiler......even worse problems
I don't think i'm setting it up right

Here's my process as I understand it.(example with microvis c++ 08)
-Open Microvis
-File/NewProject/windows console app
-Copy The hello program into program page as follows

// my first program in C++

#include <iostream>
using namespace std;

int main ()
{cout << "Hello World!" << endl;
return 0;
}

-Build
-Run

Here's the errors i get
Error 1 Preprocessor directive expected C:\Users\Boyd\AppData\Local\Temporary Projects\ConsoleApplication1\Program.cs 3 2 ConsoleApplication1
Error 3 Identifier expected; 'namespace' is a keyword C:\Users\Boyd\AppData\Local\Temporary Projects\ConsoleApplication1\Program.cs 4 7 ConsoleApplication1
Error 4 { expected C:\Users\Boyd\AppData\Local\Temporary Projects\ConsoleApplication1\Program.cs 4 20 ConsoleApplication1
Error 5 } expected C:\Users\Boyd\AppData\Local\Temporary Projects\ConsoleApplication1\Program.cs 9 2 ConsoleApplication1


Can anyone explain what i am doing wrong or at least point me to the compiler the tutorial author used. I would like to continue with the tutorial but if i am frustrated.

Thank you
White



(On VC++) start from an Empty Project (not CLR)
closed account (z05DSL3A)
You seem to be a bit all over the place.

The problem with what the sample code/error that you have posted is that you are using the wrong compiler. The one you have used looks like Microsoft visual C# 2008 express.

You want to use Microsoft Visual C++ 2008 express.
http://www.microsoft.com/express/vc/

Last edited on
Thanks..Your right.. I was using c# and not c++...
it works now..

You the man!
White
Topic archived. No new replies allowed.