We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0fd237b + b849e65 commit 96020fbCopy full SHA for 96020fb
C++/encrypt-and-decrypt-strings.cpp
@@ -18,6 +18,7 @@ class Encrypter {
18
string encrypt(string word1) {
19
string result;
20
for (const auto& c : word1) {
21
+ if (!lookup_.count(c)) return "";
22
result += lookup_[c];
23
}
24
return result;
0 commit comments