Hey everybody!
I couldnt use the switch in C++.
My study code is:
Where the error in my code? How can I fix it?Code:#include <iostream> using std::cout; using std::cin; using std::endl; int main(){ int a; cin >> a; switch (a) { case '1': cout << "111"; break; case '2': cout << "222"; break; case '3': cout << "333"; break; default: cout << "Incorrect"; break; } system("PAUSE"); return EXIT_SUCCESS;
Thanks!