User forums > Help

i'm very much a beginner in need of help :(

(1/4) > >>

puhatch:
I've been taking Java classes for two years and I use "BlueJ" as a compiler. Compiling/Running programs on it is very simple and easy. A C++ book caught my eye at the book store and I bought it. Here is the first "starter" program it tells me to type...

int main(int argc, char* argv[])
{
        return 0;
}

I typed this in an empty file in Code::Blocks. Every time I press Build (which I assume is C++'s equivalent of Compile), it gives me 0 errors and 2 warnings. the warnings say:
"Warning W8057 : Parameter 'argc' is never used in funtion main"
"Warning W8057 : Parameter 'argv' is never used in funtion main"

And after I press Build, I press Run. And it prompts me that my file hasn't been built yet (even though I just built it) and nothing runs. So, if anyone could help with this, that would be great. And any other basic/beginner advice is extremely welcome.

Pecan:
CUNY CodeBlocks Student Manual
http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/codeblocks-instructions.pdf

This is *not* a programming forum. Questions must be particular to CodeBlocks.

You should find a good C++ forum and read the manual posted above.

puhatch:
sorry. I thought that it was considered to be about CodeBlocks because i thought it was just a problem i was having with codeblocks. didn't mean to break rules.

Paul C. Anagnostopoulos:
I have the same problem: Why does it tell me I haven't built my program yet when I just built it?

This problem, coupled with similar ones I'm having, makes me think that some of us do not understand Code::Block's build model.

~~ Paul

dmoore:
Hi puhatch: works for me, so I suspect you must have something wrong with your compiler setup. what os, cb version and compiler are you using? (assuming you are on windows) if possible reinstall with the full mingw/gdb suite and make sure it is set to default under compiler settings.

another thing to try: use the wizard to create a project (file -> new -> project, select console app) and make sure that compiles and runs correctly.

Navigation

[0] Message Index

[#] Next page

Go to full version