I just looked over the entirety of the code. I didn't see any errors. OP [CODE] next time please. Makes it a hell of a lot easier to read through code. Next...

I believe you have to look for the include files. I believe some of those include files come with the program so when you do gcc -o you have to add them.

I believe the syntax is:

gcc <source file> <input file> -o new file

I might be wrong I haven't used gcc in a while. Anyway check the man for it. But, I have a feeling that's what's going on. You said in another post you know C and C++.