Just starting programing on my PC

Started by
6 comments, last by Crypter 17 years, 1 month ago
Hey this is my first post, this site is so cool everything im interested in. Well i have been programing my calculator for a year now (when im bored in class) and wanted to get in real programing. I think i want to learn c++, I've started with http://www.cplusplus.com/doc/tutorial/program_structure.html (dont know HTML too well) and i downloaded visual c++ 2005 express edition. This is where im stuck the tutorial gives me codes which i understand but i dont know how to use the compiler to test them. If anyone cound help that would be great. Thanks!
Advertisement
In MSVC++ Express, you have to first create a new project.

Go to File->New->Project in the menu.

In the "New Project" dialog box, select "General" in the left plane,
and "Empty Application" in the right plane. Enter your projects name,
and select OK.

Your project should open, and you can type the code.

To build (Compilies and links all source files), Select Build from
the menu (or just hit F7)

F7 will only recompile (and link) the files that need it (Not rebuild the
entire solution.)

btw, a "Solution" is a collection of "Projects" for a specific system
you are building.
A handy little C++ book I found was ...

Microsoft Visual C++ 2005 Express Edition - for absolute beginners.
By Aaron Miller, Published by Thomson - Course Technology

Bold easy text, plenty of screen shots, and it takes you through using visual studio, and making tic-tac-toe, and rock-paper-scissors.
----------------------------------------Now just hit that link that says 'Rate This User' [wink]
First off, I would recommend going to your local book store and getting a solid book on the topic and working your way through it. It helped my transition from calculator programming -> C programming years ago.

Anyways you shouldn't have to do anything special to compile such a basic program in VC++ since you're not using any additional libs.

Any particular step you're having trouble with?

- Dan
Quote:Original post by nofmxc
Hey this is my first post, this site is so cool everything im interested in. Well i have been programing my calculator for a year now (when im bored in class) and wanted to get in real programing.


What kind of calculator? Fooling around on a ti-83+/89 during class is great.
www.cplusplus.com seem pretty good, no need to buy a book imho.

The step everyone block when starting with VC++ is the "empty project" checkbox. When you don't check it you end up with a framework of a few files that nobody want.

Step missing from Crypter explanation : once you have your empty project, select new > files > c++ source file and then add it to the project.

next thing to learn with VC++ is debugging (setting breakpoints, checking values on run-time) but you'll see that soon enough.

btw, I coded games on my TI-83 in math class too :)
OK, first off thanks for all the help. I figured out how to make my own blank page to start working in and i found build, but what now. Does this make a executable file that i can open and i will work? How do i see when my program does after i compile it?

and BTW i have a ti-83+. Lots of programs, connect four,guess a number a slow version of a tron like game, and many other simple games.
You can use "Build Solution" (Or rebuild solution), which will compile
and link all of your source files together.

Compiling generates object code files (*.obj) for your linker.

The linker combines all of the object files into an executable program.

There is a bit more details then this, but this is the basics.
The executable program is useually a *.exe that is created in the same
path as your project files.

(It would be under the debug folder if you are building debug mode,
release folder if release build)

To run your program within the IDE, Click "Debug" from the menu,
and select "Start without debugging"

This topic is closed to new replies.

Advertisement