Skip to content

Instantly share code, notes, and snippets.

@uhziel
Created May 19, 2014 02:57
Show Gist options
  • Select an option

  • Save uhziel/dc47de5f384b6f95824f to your computer and use it in GitHub Desktop.

Select an option

Save uhziel/dc47de5f384b6f95824f to your computer and use it in GitHub Desktop.
The size of scalars
#include <iostream>
int main()
{
std::cout << "The size of scalars:" << std::endl;
std::cout << "int\t" << sizeof(int) << std::endl;
std::cout << "long\t" << sizeof(long) << std::endl;
std::cout << "short\t" << sizeof(short) << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment