On 14-Dec-07, at 11:15 PM, Bob Delaney wrote: > I found the problem. Xcode C++ treats 'long int' as a 32 bit number. > This code: > > cout << "sizeof(long) = " << sizeof(long) << endl; > cout << "sizeof(int) = " << sizeof(int) << endl; > cout << "sizeof(long long) = " << sizeof(long long) << endl; > cout << "sizeof(long int) = " << sizeof(long int) << endl; > > gives the output: > > sizeof(long) = 4 > sizeof(int) = 4 > sizeof(long long) = 8 > sizeof(long int) = 4 > > So long is 4 bytes or 32 bits, int is 32 bits, long long is 64 bits, > but long int is only 32 bits! What a terrible trap for any programmer!
But long IS just short hand for long int _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
