Home > C++, VC++ > Wanna know the limits of native types?

Wanna know the limits of native types?

Use stl class numeric_limits. Wonderful class. It helps you in listing out the

  1. Maximum and minimum value for a native type
  2. The number of bits taken by a native type
  3. Whether a type is signed or unsigned
  4. Whether a type can represent a NaN
  5. Whether a type can represent positive infinity…

etc..

Check out the class in MSDN for a sample program.

Categories: C++, VC++ Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: