My program seems to compile with the g++ compiler, but not with the gcc compiler. Whats going on?
g++ is the compiler for C++ programs, while gcc is the compiler for C programs. You should be using only gcc, as your program is to be written in C, not C++. If you are getting errors with gcc, it means that your program contains some elements of C++ that must be removed or converted into ordinary C.