Code::Blocks Forums

User forums => Help => Topic started by: Dwight939 on May 04, 2012, 01:43:34 am

Title: Only runs "Hello World" default program
Post by: Dwight939 on May 04, 2012, 01:43:34 am
Even after I erase all the code on-screen and start building a program and try to run it, it always runs the basic "Hello World" program. What am I doing wrong? I'm a beginner and am trying to follow a tutorial on learning C++ but I can't progress while Code::Blocks doesn't work for me. Help please!
Title: Re: Only runs "Hello World" default program
Post by: ollydbg on May 04, 2012, 01:56:10 am
Tell us what is the steps you do? We need more detailed information.
Title: Re: Only runs "Hello World" default program
Post by: Dwight939 on May 04, 2012, 01:58:57 am
I open Code::Blocks, start a new console application, and then erase the parts of the code that make it type "Hello World," then I copy code from the tutorial exactly as it is on the video, but when I run it it still types "Hello World" as if I've done nothing to it at all.
Title: Re: Only runs "Hello World" default program
Post by: stahta01 on May 04, 2012, 02:14:29 am
Try compiling the new code.
Note: You may have to save it first.

Tim S.
Title: Re: Only runs "Hello World" default program
Post by: ollydbg on May 04, 2012, 02:14:42 am
but when I run it it still types "Hello World" as if I've done nothing to it at all.
OK, so does the tutorial forget to tell you that you need to build the application before run it?
Title: Re: Only runs "Hello World" default program
Post by: Dwight939 on May 04, 2012, 02:54:15 am
I do that, I save it, and then press "build and run." I've also tried building then running seperately. I get the same result.
Title: Re: Only runs "Hello World" default program
Post by: ollydbg on May 04, 2012, 03:47:10 am
Maybe, you can have a look at:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
and show us the full log message.
Title: Re: Only runs "Hello World" default program
Post by: stahta01 on May 04, 2012, 02:47:36 pm
I do that, I save it, and then press "build and run." I've also tried building then running seperately. I get the same result.

Try using rebuild; the run erases the build log.
Which likely is full of errors.

Tim S.