Skip to content

Instantly share code, notes, and snippets.

@jonjesbuzz
Created December 4, 2014 03:23
Show Gist options
  • Save jonjesbuzz/1a6b3af84d7c396c1b4f to your computer and use it in GitHub Desktop.
Save jonjesbuzz/1a6b3af84d7c396c1b4f to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#define failprint(...) if (printf(__VA_ARGS__) < 0) { printf("%s\n", "Print failed"); exit(-1);}
int main(int argc, char *argv[]) {
failprint("%s\n", "Hello world");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment