Well, the short version is that it's not right.
But we won't always be able to tell you that.
How would you determine if it's right or not? You have to use the function in a series of tests.
input --> expected output.
Does the given input produce the expected output? Start with simple examples to see if they work.
Some specific issues
// if we have a vowel, add '0' before and after decryptedChar
This change doesn't affect anything, because decryptedChar isn't being used to do anything. It's simply a local char variable that you have declared.
It also isn't doing what you intend, because you're adding to the value of the char itself. A char is not a string. A string is made up of multiple chars.
Here is how you prepend '0' to a string:
string str = "blah";
str = "0" + str;
size_t found = VOWELS.find(VOWELS);
if (currentChar = found)
= is for assignment, not testing for equality. == tests for equality.
But this is not how string.find is used.
Check out https://www.geeksforgeeks.org/string-find-in-cpp/
for some examples,
string str = "geeksforgeeks a computer science";
string str1 = "geeks";
// Find first occurrence of "geeks"
size_t found = str.find(str1);
if (found != string::npos)
cout << "First occurrence is " << found << endl;
You return ss.str(), but where do you ever add anything to ss?