Hi all,
I'm new to c++ and try to do this homework but run into this problem. If I commend the the first 4 line as shown below, the loop work as expected. But if I take away the comment the loop run nonstop. What did I do wrong? Thanks in advance for any input!
Hi all thanks for the responding! I'm able to input the string but when I hit enter the loop run none stop. This is a part of the program where I supposed to encrypting the input string then using the encrypting code number from 1-50. I will try as firedraco suggested to see what happening. Thanks again!
Well, the string1 has nothing to do with his do while loop here. So unless your feeding it weird input for encryp_code, I don't see what could be going wrong. And OP isn't mixing cin.getline() with cin<<, so there shouldn't a buffer issue.