问答题
请使用VG6或使用【答题】菜单打开考生文件夹pmjl下的工程proj1,其中有枚举DOGCOLOR、狗类Dog和主函数main的定义。程序中位于每个“//ERROR****found****”下的语句行有错误,请加以改正。改正后程序的输出结果应该是: There is a white dog named Hoho. There is a black dog named HaIla. There is a motley dog named Hihi. 注意:只修改每个“//ERROR****found****”下的那一行,不要改动程序中的其他内容。#include<iostream>using namespace std;//狗的颜色:黑、白、黄、褐、花、其他enum DOGCOLOR{BLACK,WHTTE,YELLOW,BROWN,PTEBALD,OTHER);class Dog {//狗类 DOGCOLOR colot; char name[2 O]; static int count;public: Dog(char name[],DOGCOLOR color){ strcpy(this一>name,name);//ERROR**********found********** strcpy(this一>color,color); } DOGCOLOR getColor()const{return color;)//ERROR**********found********** COnSt char*get:Name()const{return*name;) const char* getColorString()const{ switch(colot){ CaSe BLACK:return”blaCk”; case WHITE:return”white”; CaSe YELLOW:return”yellow”; case BROWN:return”brown”; CaSe PIEBALD:return”piebald”; } return”motley”; } Void show()const{ cout<<”There is a”<<getColorString()<<”dog named”<<name<<’.’<<endl; } }; int main(){ //ERROR**********found********** Dog dog1(”Hobo”,WHITE),dog2(”Haha”,BLACK);dog3(”Hihi”,OTHER); dog1.show(); dog2.show(); dog3.show(); return 0; }