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