News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Only runs "Hello World" default program

Started by Dwight939, May 04, 2012, 01:43:34 AM

Previous topic - Next topic

Dwight939

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!

ollydbg

Tell us what is the steps you do? We need more detailed information.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Dwight939

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.

stahta01

Try compiling the new code.
Note: You may have to save it first.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

ollydbg

Quote from: Dwight939 on May 04, 2012, 01:58:57 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?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Dwight939

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.

ollydbg

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

stahta01

Quote from: 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.

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

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]