Hello there, i have this code and at the part with encrypt (goto) it cout first line and skipp all and return, i dont know how to fix this, can ya help me? Thanks in advance!
For more exact info, compile and run it, after chose/type encrypt and you can see my problem, i hope i will fix it!
+closed account 5a8Ym39o6 http://puu.sh/pSbGi/12ceefd491.png
There, where you see at my program "Sentence to be encrypted".
It needed to be:
*Insert text* (Random text)
*Show text* (something like 01012 00101 ...)
But it give white space and skip the insert (and after) part and go to the return.
I hope i explained good
+kemort
Im sure, look at the image.
+closed account 5a8Ym39o6
I change it, same problem.
The program did tell you to input something but you didn't seem to be inputting it and simply pressing Enter. Should it be "Hello World", "Homeland", etc
If the function getline happens not to work, use cin >> w; instead.
I found the problem,
at std::getline (std::cin,w); if i change it with cin >> w; it will solve the problem, but after, it will not take the complete sentence, only first word.
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); //prepare for following getline() after a cin
See the following if this is the problem you're talking about and you want a good long explanation http://stackoverflow.com/questions/11835226/program-skips-cin-getline