Last active
December 24, 2015 05:18
-
-
Save jonahgeorge/6749232 to your computer and use it in GitHub Desktop.
Command Line Options
This file contains 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> | |
#include <cstring> | |
using namespace std; | |
int main (int argc, char *argv[]) { | |
cout << "Number of args: " << argc << endl; | |
cout << "Name of program: " << argv[0] << endl; | |
if (argc > 1) { | |
cout << "2nd argument: " << argv[1] << endl; | |
} | |
return 0; | |
} |
This file contains 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
\033[22;30m - black | |
\033[22;31m - red | |
\033[22;32m - green | |
\033[22;33m - brown | |
\033[22;34m - blue | |
\033[22;35m - magenta | |
\033[22;36m - cyan | |
\033[22;37m - gray | |
\033[01;30m - dark gray | |
\033[01;31m - light red | |
\033[01;32m - light green | |
\033[01;33m - yellow | |
\033[01;34m - light blue | |
\033[01;35m - light magenta | |
\033[01;36m - light cyan | |
\033[01;37m - white | |
e.g. for light blue | |
printf("\033[01;34m Hello World"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment