Why does sololearn complier post and error here?
It says that there is an unqualified Id before ‘void’ in ShowX::void SetX(int y) Here is the snap bit of code: The full code is here: https://code.sololearn.com/cNA9f1f3kxO6/#cpp #include <iostream> using namespace std; class ShowX // class function { public: int GetX(){return x;} void SetX(int y); protected: int x; // we have to use the functions above to use x }; ShowX::void SetX(int y) { if(y < 0) { //the pointer throw throw new string "Sorry, the value of X was smaller than 0, causing an Exception :(\n"; } else if (y > 100) { //the value throw throw y; } else { x = y; } } I don't understand :|