For my Programming 102 class we are asked to deliver C code that compiles and runs under Linux. I don\'t have enough spare space on my hard drive to install Linux alongside Wind
Some hints:
Post your code. I'll bet you will get some good input that will make you a better programmer.
Turn on warnings with the -wall
option and correct any problems that are reported. Again, it can help make you a better programmer.
Step through the code with a debugger. Besides helping you understand where the problem is, it will help make you a better programmer.
Continue to use Subversion or other source code control system.
Never blame the compiler (or OS or hardware) until you are sure you've pinpointed the problem. Even then, be suspicious of your own code.
GCC on Linux is source-code identical to GCC on Cygwin. Differences between the platforms exist occur because of the Cygwin POSIX emulation layer and the underlying Windows API. It's possible the extra layers are more forgiving than the underlying hardware, but that's not be counted on.
Since it's homework, I'd say posting code is an even better idea. What better way to learn than getting input from professional programmers? I'd recommend crediting any suggestions you implement in nearby comments, however.