I usually find that system ("gcc file.c -o file.o [options] > output 2> errors"); works well for me :-) fwyzard