Created
December 10, 2017 17:16
-
-
Save presmihaylov/f307a6e224e7150d8c1cb311c5cff28f 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 <iostream> | |
using namespace std; | |
void printError(int errorCode, string msg = "No message") | |
{ | |
cerr << "Error code: " << errorCode << " (" << msg << ")\n"; | |
} | |
int main(int argc, char *argv[]) | |
{ | |
printError(9, "Bad alloc"); | |
printError(8); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment