Skip to content

Instantly share code, notes, and snippets.

@BYVoid
Created September 22, 2012 15:02
Show Gist options
  • Save BYVoid/3766454 to your computer and use it in GitHub Desktop.
Save BYVoid/3766454 to your computer and use it in GitHub Desktop.
Global variable in multiple files (strong)
#include <stdio.h>
int buf = 0;
void func();
int main() {
buf = 1;
func();
printf("%d\n", buf);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment