• 2021-04-14 问题

    阅读下列程序,程序的运行结果是____。 #include usingnamespacestd; classAnimal { public: voidspeak(){cout<<"animallanguage!"<<endl;} }; classCat:publicAnimal { public: voidspeak(){cout<<"catlanguage:miaomiao!"<<endl;} }; intmain() { Catcat; cat.speak(); }

    阅读下列程序,程序的运行结果是____。 #include usingnamespacestd; classAnimal { public: voidspeak(){cout<<"animallanguage!"<<endl;} }; classCat:publicAnimal { public: voidspeak(){cout<<"catlanguage:miaomiao!"<<endl;} }; intmain() { Catcat; cat.speak(); }

  • 1