Author Topic: help n00b understand codeblocks.  (Read 3955 times)

Offline MegaManZZ

  • Multiple posting newcomer
  • *
  • Posts: 12
help n00b understand codeblocks.
« 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.

Offline troels

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: help n00b understand codeblocks.
« Reply #1 on: February 24, 2008, 01:01:04 am »
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

Offline ThEvis1t0R

  • Single posting newcomer
  • *
  • Posts: 3
Re: help n00b understand codeblocks.
« Reply #2 on: February 24, 2008, 02:15:35 pm »
Hi
Quote
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..

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?

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

I hope it helps you...
and I'm sorry for my English...I'm still learning
« Last Edit: February 24, 2008, 05:07:07 pm by ThEvis1t0R »

Offline MegaManZZ

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: help n00b understand codeblocks.
« Reply #3 on: February 24, 2008, 04:30:38 pm »
i appriciate all your replies. thanks guys.