User forums > Using Code::Blocks

help n00b understand codeblocks.

(1/1)

MegaManZZ:
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.

troels:

--- Quote from: MegaManZZ on February 23, 2008, 11:32:29 pm ---im using borland c++, do other compilers accept different syntax? whats the main difference.?
--- End quote ---

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

ThEvis1t0R:
Hi

--- Quote ---but when i click 'build and run' it would run a previous script that i wrote earlier?
--- End quote ---
may you should try just to click on the build button... and then run it..


--- Quote ---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?
--- End quote ---

you have to copy your files in the directory where your project lies...
and include them like this: 
--- Code: ---#include "myheader.h"
--- End code ---

I hope it helps you...
and I'm sorry for my English...I'm still learning

MegaManZZ:
i appriciate all your replies. thanks guys.

Navigation

[0] Message Index

Go to full version