I'm writing this code just for fun, and to better understand what I'm learning.
But when I build this code, 4 errors keep coming, but I don't know what they mean, or how to fix them..
Here's the code:
Line Message
40 error: jump to case label [-fpermissive]
34 error: crosses initialization of 'std::vector<char> vec'
41 error: jump to case label [-fpermissive]
34 error: crosses initialization of 'std::vector<char> vec'
I really can't figure it out...
please tell me what they mean, and how to fix them :)
thanks in advance!
They mean you have case conditions without break; statements in them. You can avoid having to declare both cases by using the toupper function from the cctype header one your 'choice' variable anytime before the switch statement EDIT: and after the users input is done: http://www.cplusplus.com/reference/cctype/toupper/?kw=toupper
This will ensure that the input is in upper case format.