Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: MegaManZZ on February 23, 2008, 11:32:29 pm
-
hey guys.. i am very n00b to programming, and need help understanding a bunch of things about code::blocks. I appriciate anyone who can help me start off or direct me via:link to somewhere that could directly and simply answer some basic questions.
first of all there are momments when i only have one console application open in the 'Default Workspace' with one source file that would just contain the default "hello world" script in main.cpp. but when i click 'build and run' it would run a previous script that i wrote earlier?. I know this might be a little vague description of my problem, but your best guess would be appriciated. please remember i am very n00b to programming.
second if i wanted to include header files or .cpp files that i made, how would i go about showing code::blocks what directory to look for those files? could i just add them to the console application?
whats the difference between header files and .cpp files when including them?.
im using borland c++, do other compilers accept different syntax? whats the main difference.?
Any quick suggestions on how i can have an efficient work environment so i can focus on coding would be truly appriciated. Shortcuts, or any tricks of the trade would be great. thank you to anyone who takes there time to reply.
-
im using borland c++, do other compilers accept different syntax? whats the main difference.?
GCC and VC are the popular C/C++ compilers. Choosing a different (niche,non-mainstream) compiler will hold you back I'd say. Syntax: Both GCC and VC are ISO compliant now, don't know about Borland.
GCC is a good choice as CodeBlocks works well together with the debugger (GDB), and having a good [integrated] debugger is crucial. Only problem with GCC is the [lack of] speed, but this only gets to be a [painful] problem with bigger projects.
Regards
-
Hi
but when i click 'build and run' it would run a previous script that i wrote earlier?
may you should try just to click on the build button... and then run it..
second if i wanted to include header files or .cpp files that i made, how would i go about showing code::blocks what directory to look for those files? could i just add them to the console application?
you have to copy your files in the directory where your project lies...
and include them like this:
I hope it helps you...
and I'm sorry for my English...I'm still learning
-
i appriciate all your replies. thanks guys.