Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) int

 

int is a keyword for the integer data type. The integer data type is suitable for for storing whole numbers.

 

int main()
{
  const int dice_value = 5;
}

 

 

 

 

 

Boost.Integer

 

Boost.Integer is a Boost library for working with integers.

 

 

 

 

 

CLN

 

CLN is a library for working with integers of near-infinite size (as long as computer memory permits). The data type is called cln::cl_I.

 

 

 

 

 

int code snippets

 

  1. C++98 GetMaxInt: get the maximal value of an int
  2. C++11 GetRandomInt64: get a random 64-bit integer
  3. C++98 IntToAnsi: convert int to AnsiString
  4. C++98 IntToBitString: convert int to a bitstring
  5. C++98 IntToGray: convert int to Gray code
  6. C++98 IntToStr: convert int to std::string
  7. C++98 IntToStrWithSep: convert int to std::string with adding thousands seperators
  8. C++98 IsInt: check if a std::string can be converted to an int

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict