0
why wont my code work?
please fix my code here : #include <iostream> using namespace std; class Bird { //complete the class, add makeSound(<< "chirp-chirp" << endl;) method } }; int main() { //instantiation Bird bird; //function call bird.makeSound(); return 2; }
1 Réponse
+ 7
david vandyke ,
you need to implement the method makeSound() in the class Bird.
> if you stuck with this, go back to the beginning of the current lesson and try reading and learning again.
> have a look at the sample code of bankAccount on the same page, this is very similar to what you need.