summaryrefslogtreecommitdiff
path: root/xsc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xsc.cpp')
-rw-r--r--xsc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/xsc.cpp b/xsc.cpp
index d2ba8c2..f4642fc 100644
--- a/xsc.cpp
+++ b/xsc.cpp
@@ -4,9 +4,11 @@
using namespace std;
void clear() {
+ // Clears the screen
system("clear");
}
void usage() {
+ // Prints usage message (help)
clear();
system("figlet XSC | lolcat");
cout << "\neXtremelySimpleCalculator usage:\n"
@@ -16,6 +18,7 @@ void usage() {
}
int doOper(int n1, char opx[], int n2) {
+ // Performs calculations, TODO: improve :)
int result;
switch (opx[1]) {
case '+':
@@ -46,6 +49,7 @@ int doOper(int n1, char opx[], int n2) {
}
int main(int argc, char* argv[]) {
+ // Main handler
if (argc > 1) {
if (argv[1] == "--help" || argv[1] == "-h") {
usage();