User forums > Help

very beginning problem... / please help :(

(1/2) > >>

bradpetrelli:
Welcome all,

I'll start with information that I'm absolutely new with programming in C++. But I want to start with CodeBlocks and i have problem on very beginning because i try to "copy - paste" first program doing everything step by step with manual for dummies... :)...

#include <cstdio>
int main()
{
    printf( "Test Code::Blocks" );
    return 0;
}

this can't be wrong :), but when I'm trying to press Ctrl+F9 or button "Build and run" I'have no respond...
I know that this can mean everything but maybe someone had similar problem...

I have last version of CodeBlocks and Windows7 ...
Please for help and big thanks for all answers.
 

mirai:
What kind of response do you expect from the system running this program?

Well, actually it's quite simple. Your program just runs and exists without any errors.
If you expect to see a console window with output of your "hello world", insert following line

--- Code: ---#include <cstdio>
--- End code ---
at the beginning of your program and

--- Code: ---getchar();
--- End code ---
just before "return 0"
to force your program to wait until you press a key after it finishes its work.

Also, it has no connection to Code::Blocks at all.

bradpetrelli:
How I have:


#include <cstdio>
int main ()
{
printf( "test" );
getchar();
return 0;
}


and still no respond from CB... also nothing in Build log... i don't have any window, any exe file any respond...   

Jenna:
Are you sure you have a compiler installed and set it up correctly ?

bradpetrelli:
can you give me some solution how I can check it ? :) I'm total n00b ... sorry... everyone was on beginning once :)...

Navigation

[0] Message Index

[#] Next page

Go to full version