The Dink Network

Reply to Re: &story

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
February 21st 2005, 05:26 PM
wizardb.gif
merlin
Peasant He/Him
 
No it isn't. ANSI standard defines -2147483648 to 2147483647. I can't be bothered to look it up at this moment but I made a quick little C++ program to prove it:

#include <iostream>
#include <limits>

int main()
{
std::cout << "largest int == " << std::numeric_limits<int>::max() << "\n";
std::cout << "smallest int == " << std::numeric_limits<int>::min() << std::endl;

return 0;
}

Yields this:

raven@aida ~$ g++ limittest.cpp
raven@aida ~$ ./a.out
largest int == 2147483647
smallest int == -2147483648

I'll find it in the ANSI standard if you want.