+ 1
No appropriate default construtor available (C++)
this error occurs when I try to enter some integer values by using the (cin>>) operator in the constructor function ... how can I fix it ?! (write a simple code for example please)
2 Antworten
+ 1
Hello MoHaMeD AhMeD . Once you put parameters into the constructor, you HAVE to make sure that you have a default constructor when you create objects without parameters. In other words, you can not create an object like this
Obj obj;
If you don't have a default constructor, which in this case would be:
Obj() {};
+ 1
Please post your full code.