I believe I already have a sound understanding of the structure of C++ as I have used Game Maker and I understand it's very similar language.
However, I haven't a clue how to compile it.
I've tried eclipse, when I copy and paste the "Hello World" example, it throws up an error. Either "Binary File not Found" or something about a "UI Error". There is obviously nothing wrong with the code so what's wrong?
Can anybody reccomend a more simple IDE/Compiler where I can type a program and have it instantly work? I want notepad except with colour coding and a compiler!
I have another question however.
You know in Dev-C++ there can be different source files in one project?
What is the purpose of that?
Can I use these like you use scripts in Game Maker?
IE. Can I store some code in a different place to make things easier to understand and look much cleaner?
You have different source files because nobody wants to write 1 file that is going to be 200,000 lines long, and has to be written in a specific order with a HEAP of forward declarations (prototypes) to prevent compiler errors.
You have to use "include" files, at the top of your code use statements like:
#include "somefile.h"
Usually only the "function prototypes" and "class prototypes" are stored in the .h files.
The actual implementation code is usually included in a file which has the same name but that has a .cpp extension intead "somefile.cpp" the .cpp file does not need to be included.