Skip to content

Commit

Permalink
Fix bug where CLI closes after encryption/decryption
Browse files Browse the repository at this point in the history
  • Loading branch information
winexe0 committed Dec 10, 2022
1 parent d9bfb08 commit 99dfee8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/decrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int decrypt() {
newMessage += newCharacter;
}
}
cout << "Your decrypted message is '" + newMessage + "'" << endl;
cout << "Your decrypted message is '" + newMessage + "'. Press ENTER to exit" << endl;
}
return 0;
}
2 changes: 1 addition & 1 deletion src/encrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int encrypt() {
newMessage += newCharacter;
}
}
cout << "Your encrypted message is '" + newMessage + "'" << endl;
cout << "Your encrypted message is '" + newMessage + "'. Press ENTER to exit" << endl;
}
return 0;
}
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ int main(int argc, char** argv) {
if (crypt == "decrypt") {
decrypt();
}
cin.ignore();
cin.get();
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
Expand Down

0 comments on commit 99dfee8

Please sign in to comment.