Thank you so much for your help.
So Listing 1.2 and 1.3 should both be seperate .cpp files?
Do you know what type of project I need to create - there are 20+ categories such as (ARM, AVR, Direct/X, GTK+, Matlab, Code::Blocks Plugin, SDL, etc. etc.)
What compiler do you reccomend as I am fine with switching from Code::Blocks?