Thread: Moving on
View Single Post
Old
Nighthawk0973
Senior Member
 
Nighthawk0973's Avatar
 
Status: Offline
Posts: 240
Join Date: May 2011
Location: In front of my computer.
Default 08-10-2011, 10:46 PM

I'm confused on how you would have so much troubles with this... Most of this is pretty self explanitory really... maybe I forgot something in my Hello World code... Also, codeblocks is the same as C++ it's just using a different compiler than your used to. Most of it works great though.

Acually I take that back. Project setup might be a bit confusing for the absolute beginner so let's take this step by step...

Step 1 - Open up Code::Blocks

Step 2 - File->New->Project

Step 3 - Choose Console Application and Hit 'Go'

Step 4 - Click Next

Step 5 - Make sure the language 'C++' (not C) is chosen and click next.

Step 6 - Make the project name 'Programming' or something else that you would like and than Click Next. It prompted, Overwrite the project.

Step 7 - Make sure the Compiler is: GNU GCC Compiler, and leave everything else at the default. I believe the 'GNU GCC Compiler' is a standard C++ compiler. You could run other compilers once your more experienced. The coding will be different though.

Step 8 - Click Finish and overwrite again if it prompts you.

Step 9 - Expand the Sources folder and double click main.cpp

Step 10 - Copy the source code I wrote down (the Hello World source) and paste it into the main.cpp file

Step 11 - Press F9 and watch the magic happen!

Please note my Code::Blocks version is 10.05 if that changes anything which I doubt...

@legolizard
According to www.cplusplus.com '::' is called the Scope Operator, not the Scope Insertion Operator. That's what I would've thought it was if I hadn't googled it just to be sure.
   
Reply With Quote