Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 08-10-2011, 01:14 PM

Don't worry about what Nighthawk did he was just explaining why Code :: Blocks uses the two :: (if I remember correcty it is called the unary scope resolution...... operator......thing could be wrong though. I think it is used in other things but I would have to test it out I generally don't use it.) The main point though is that Nighthawks code is "oriented" differently than what you are used to, but don't worry all will be revealed in no time.


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
Old
belso
Member
 
Status: Offline
Posts: 42
Join Date: Jan 2010
Default 08-10-2011, 03:15 PM

I used his hello world code


/|..__________________/\_
/ `---___________----_____|]-------<BLAM>------>
/_==o;;;;;;;;_______.:/
), ---.(_(__) /
// (..) ), ----"
//___//
//___//
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 08-10-2011, 04:03 PM

Ah okay. Well I think I know why this is but I need to see what it says at the bottom in the "build log" to be sure.


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
Old
belso
Member
 
Status: Offline
Posts: 42
Join Date: Jan 2010
Default 08-10-2011, 08:23 PM

The build log is blank


/|..__________________/\_
/ `---___________----_____|]-------<BLAM>------>
/_==o;;;;;;;;_______.:/
), ---.(_(__) /
// (..) ), ----"
//___//
//___//
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 08-10-2011, 08:36 PM

Hmmmm. Well when you downloaded Code :: Blocks did you get the first one for Windows or the second one?


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
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, 09: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
Old
belso
Member
 
Status: Offline
Posts: 42
Join Date: Jan 2010
Default 08-11-2011, 02:04 AM

Ok i got to the point where i expand the sources file but where is the sources file?


/|..__________________/\_
/ `---___________----_____|]-------<BLAM>------>
/_==o;;;;;;;;_______.:/
), ---.(_(__) /
// (..) ), ----"
//___//
//___//
   
Reply With Quote
Old
Nighthawk0973
Senior Member
 
Nighthawk0973's Avatar
 
Status: Offline
Posts: 240
Join Date: May 2011
Location: In front of my computer.
Default 08-11-2011, 12:41 PM

Did you follow all the steps exactly as I said? It's in the project explorer (or something equivilant to that) on the righthand side, just like legolizard said you click the plus and the sources folder will expand and reveal main.cpp.
   
Reply With Quote
Old
belso
Member
 
Status: Offline
Posts: 42
Join Date: Jan 2010
Default 08-11-2011, 07:55 PM

Ok i did everything you said and the build log said this "Hello - Debug" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done.


/|..__________________/\_
/ `---___________----_____|]-------<BLAM>------>
/_==o;;;;;;;;_______.:/
), ---.(_(__) /
// (..) ), ----"
//___//
//___//
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 08-11-2011, 08:09 PM

When you first downloaded C::B did you get the first one or the second one? First one bad second one good.


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.