For the typical programming class, you would be pretty unlikely to run into any C++ compatibility issues with VCPP 5 or VCPP.Net.
Now if you're heavily into the STL, then you might have some problems. It's possible to purchase an improved standard C++ Library for VCPP, but for a student, it's not worth the cost. At least in the past, Microsoft sublicensed its C++ library from an outside firm.
If it's just console programming assignments, I'd go w/ GCC though. However, sticking with whatever compiler/platform the code is graded on is always a good idea (unless its something like Java code, which is significantly more portable).