As a function as and expects parameter .As result error
Expected parameter declarator
alternatively can be done
class Widget {
private:
int x{ 0 };
int y = 0;
int z;
public:
Widget():z(0){}
};
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more