It's just a coding style issue. I hate nesting the main logic, I'll write it as:
int main(int argc, string argv[])
{
if (argc != 2)
{
printf("ERROR: Please only enter a single key! \n");
return 1;
}
string msg = GetString();
}
BTW: The signatrue of main
should be int main(int argc, char *argv[])
.