Created
December 10, 2017 17:21
-
-
Save presmihaylov/9f9c065ceec3c0014d04e165e531f063 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define printErrord(errorCode) printError(errorCode, "No message") | |
void printError(int errorCode, char *msg) | |
{ | |
printf("Error code: %d (%s)\n", errorCode, msg); | |
} | |
int main(int argc, char *argv[]) | |
{ | |
printError(9, "Bad alloc"); | |
printErrord(8); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment