Updated comments, rebuilt exe

This commit is contained in:
2017-09-04 04:07:33 -05:00
parent c8c2a1853c
commit b2d05f7700
2 changed files with 9 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
/*
Compiler: g++
Flags: -static-libgcc -static-libstdc++
*/
#include <iostream> #include <iostream>
#include <string> #include <string>
#include "argh.h" #include "argh.h"
@@ -7,7 +13,6 @@ void exampleMessage();
int main (int argc, char* argv[]) int main (int argc, char* argv[])
{ {
std::string file, check; std::string file, check;
//std::string check = "" ;
int port = 0; int port = 0;
argh::parser cmdl; argh::parser cmdl;
@@ -36,14 +41,14 @@ int main (int argc, char* argv[])
if (port < 1 || port > 65535) // validate port number if (port < 1 || port > 65535) // validate port number
exampleMessage(); exampleMessage();
} }
catch (std::invalid_argument) catch (std::invalid_argument) // failed convert
{ {
exampleMessage(); exampleMessage();
} }
} }
} }
if(file == "" || check == "" || port == 0) if(file == "" || check == "" || port == 0) // failed validation
exampleMessage(); exampleMessage();
std::cout << "File:\t" << file << std::endl; std::cout << "File:\t" << file << std::endl;
@@ -54,7 +59,7 @@ int main (int argc, char* argv[])
return 0; return 0;
} }
void exampleMessage() void exampleMessage() // help menu
{ {
std::cout << "Availble options:" << std::endl; std::cout << "Availble options:" << std::endl;
std::cout << " -f\tLocation of card0.txt file" << std::endl; std::cout << " -f\tLocation of card0.txt file" << std::endl;

Binary file not shown.