-
-
Save sakibguy/9441718b83880362fc942a7a1732329d 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