I'm new to C++ programming, so please bear with me! I bought the Accelerated C++ book and I don't know how to run the "Hello World" sample program from chapter 0. However, I don't know how to run it from Visual C++ Express 2005.

Please, guide me on how to use VC++ to use the examples from the book, if possible.

Thanks in advance,
Cero

01-08-2006

cero

So I guess I'm on my own...I thought someone was willing to help =(. Anyway, thanks for at least looking at my post.

01-08-2006

ZuK

Quote:

Originally Posted by cero

So I guess I'm on my own...I thought someone was willing to help =(. Anyway, thanks for at least looking at my post.

Since I don't use any MS-IDE I cannot tell you the exact precedure for this IDE.
Usually the steps necessary are:
1) create a project ( console type in your case ).
2) create a source - file and add it to the project ( might already be done by step 1 ).
3) type in your code.
4) build
5) run

Well, I want to be more especific about what my problem really is though Kurt seems to understand where I'm coming from. Syneris, I will try to post the code later for better reference; I just need to learn how to post code here. Thank you, to both of you for your insight.

First when I open VC++ and I proceed to create a project, it offers me three types of main projects -I would call it- which are CLR, Win32, and General project types.

Within each project type, it has more sub-project types. For example, under CLR project type option, it offers: "Class Library," "CLR console application," "CLR empty project," and "Windows Forms Application" projects. Then under Win32 project type option, it only offers the "Win32 Console Application." And finally under General project type, it only offers "Empty Project" and "Makefile Project."

By intuition, I first chose the "Empty Project" option to do the sample "Hello World" from the book but I was not able to run it like in VB, which it has a "run" option to build your code. Then I proceeded to choose the "Makefile Project" to see if that would let me build my project but to no avail. Further, I did more reading on how to build basic code like the "Hello World" from the IDE but I didn't find no info on running or building a ".cpp" file direct from the IDE. It did mention, however, that there is a "build" menu where you could run your code, which I found but still it will not allow me to run or build either the .cpp file or the code if I type it myself.

01-08-2006

cero

Quote:

Originally Posted by ZuK

Since I don't use any MS-IDE I cannot tell you the exact precedure for this IDE.
Usually the steps necessary are:
1) create a project ( console type in your case ).
2) create a source - file and add it to the project ( might already be done by step 1 ).
3) type in your code.
4) build
5) run

Kurt

I was able to run the sample program...I battled a bit going through the "console" types programs, and finally did it. Thanks, Kurt :cool: