Skip to content

Instantly share code, notes, and snippets.

@jeffcrouse
Last active December 25, 2015 06:49
Show Gist options
  • Save jeffcrouse/6935189 to your computer and use it in GitHub Desktop.
Save jeffcrouse/6935189 to your computer and use it in GitHub Desktop.
1. save this program as size.cpp 2. compile it: g++ -o size size.cpp 3. run it: ./size
#include <iostream>
using namespace std;
int main ()
{
int foo;
cout << "sizeof(foo) = " << sizeof(foo) << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment