Skip to content

Instantly share code, notes, and snippets.

@nilium
Created April 5, 2009 20:22
Show Gist options
  • Save nilium/90525 to your computer and use it in GitHub Desktop.
Save nilium/90525 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include "test.h"
int main(int argc, char ** argv)
{
int i = globalVariable;
globalVariable = 50;
printf("%i\n%i\n", i, globalVariable);
return 0;
}
#include "test.h"
int globalVariable = 0;
#ifndef _EXAMPLE_H_
#define _EXAMPLE_H_
extern int globalVariable;
#endif /* end of include guard: _EXAMPLE_H_ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment