Skip to content

Instantly share code, notes, and snippets.

@TheCatPlusPlus
Created November 25, 2013 10:20
Show Gist options
  • Save TheCatPlusPlus/9fcb869bd7cbe8df0f4a to your computer and use it in GitHub Desktop.
Save TheCatPlusPlus/9fcb869bd7cbe8df0f4a to your computer and use it in GitHub Desktop.
> cat a.c++
#include <iostream>
extern int foo;
int main() {
std::cout << foo;
}
> cat b.c++
int foo = 42;
> g++ a.c++ b.c++ -o test.exe
> .\test
42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment