+ 1
Hey friends please check my error...below
include <iostream> using namespace std; class MyClass { public: MyClass(int a, int b); private: int regVar; const int constVar; }; MyClass::MyClass(int a, int b) : regVar(a), constVar(b) { cout << regVar << endl; cout << constVar << endl; } class MyClass2{ public: MyClass2 (int y,int x); private: int tegar; const int liter; }; MyClass2::MyClass2(int y,int x) :tegar(y),liter(x) cout<<tegar<<endl; cout<<liter<<endl; int main() { MyClass obj(42, 33); MyClass2 obj(32,"45"); }
1 Réponse
+ 8
If this helps☺️☺️.
https://code.sololearn.com/c0x745GUc64a/?ref=app