Posted by: gidilat August 5, 2005
Login in to Rate this Post:
0
?
A neat trick.
"a"[0] = 'k';
As you suspected, GCC catches the problem during compilation.
MSDEV, on the other hand will not catch it if you compile as
cl test.c
If you create a project, and if /ZI is one of the compile time options, then MSDEV allows you to compile/link - but if you run it - you get a run time exception.
Try compiling as:
cl /ZI test.c
BTW I am using vc7 from Visual Studio .Net 2003.
"Back then memory was scarce" - it still is. Just depends upon what are programming. If you are programming a toy to be sold for pennies - then you wish like hell you had a byte more.