Hi, We are building a code having the call to the function srand48 and drand48. Using the older gcc versions which is 4.2.0 the code runs smoothly. However when compiled using the latest gcc version (4.3.0) it gives the following error.
testTBuffer.cpp:24: error: ‘srand48’ was not declared in this scope testTBuffer.cpp:27: error: ‘drand48’ was not declared in this scope On including the header file stdlib.h the problem gets solved. What difference in header files between the two versions of the compiler is causing this problem? Is this a defect? Is there any workaound to this problem other than manipulating each and every file in the project? Sample program that will reproduce the problem: #include<iostream> int main(void) { printf("Hello World \n"); srand48(clock()+getpid()); } Awaiting your help in solving this problem, -- Thanks & Regards, Snehalatha ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ