|
From: Siva C. <siv...@ya...> - 2004-01-10 08:15:46
|
hello,
I used g++ in linux. I have recently shifted to
windows and am using dev-cpp 4.9.8.0 for my win32
projects. there is some thing strange(or is it?) i
have found.
I used the follwoing piece of code as a test:
int *a;
a = (int *)malloc(sizeof(int));
*a = 5;
free(a);
printf("%d\n", *a);
This prints 0 in the linux environment and 5 in the
windows environment!!
does anyone out there know whats happening??
the same happens with new and delete!!
TIA,
=====
Siva Chandra
B-Tech, Electrical Engineering,
IIT Madras.
Currently pursuing MS by research at IIIT, Hyderabad
visit www.geocities.com/sivachandra_br
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
|