Skip to content

Instantly share code, notes, and snippets.

@ramajd
Created January 18, 2020 19:43
Show Gist options
  • Save ramajd/bcac47747a9a1c4abf6d3d47c27f4a3c to your computer and use it in GitHub Desktop.
Save ramajd/bcac47747a9a1c4abf6d3d47c27f4a3c to your computer and use it in GitHub Desktop.
preprocessor definition in c
#include <stdio.h>
#ifndef MYFLAG
#define MYFLAG "default flag"
#endif
int main() {
printf("compiled with: %s\n", MYFLAG);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment