Skip to content

Commit

Permalink
Corrected argv index to be static ensuring that the first parameter p…
Browse files Browse the repository at this point in the history
…assed will always be the input file name.
  • Loading branch information
rakesh-porob committed Jan 28, 2016
1 parent 519e1b4 commit 0f5ee1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main(int argc, char *argv[])
if (argc < 2)
throw std::invalid_argument("Input parameter file (*.dat) not specified on command line!");
else
inputFileString = argv[argc - 1];
inputFileString = argv[1]; //FIRST PARAMETER WILL ALWAYS BE FILE NAME

inputFileReader.open(inputFileString.c_str(), ios::in | ios::out); //OPEN FILE
if (!inputFileReader.is_open()) //CHECK IF FILE IS OPENED...IF NOT OPENED EXCEPTION REASON FIRED
Expand Down

0 comments on commit 0f5ee1a

Please sign in to comment.