A-A+

请使用VC6或使用【答题】菜单打开考生文件夹projl下的工程projl。程序中位于每个“/

2022-08-05 21:49:31 问答库 阅读 172 次

问题详情

请使用VC6或使用【答题】菜单打开考生文件夹projl下的工程projl。程序中位于每个“//ERROR****found料****之后的一行语句有错误,请加以改正。改正后程序的输出结果应为: Name:Smith Age:21 ID:99999 CourseNum:12 Record:970 注意:只修改每个“//ERROR****found****”下的那一行,不要改动程序中的其他内容。 include<iostream> using namespace std; class Studentlnfo { protected: //ERROR********************found**************** char Name; int Age; int ID: int CourseNum; float Record; public: Studentlnfo(char*name,int Age,int ID,int coumeNum,float record); //ERROR ********************found******************** void~Studentlnfo{} float AverageRecord{ return Record/CourseNum; } void showconst{ cout$amp;请帮忙给出正确答案和分析,谢谢!

参考答案

正确答案:

(1)char*Name;
(2)~Studentlnfo{}
(3)Studentlnf0::Studentlnfo(char*name,int age,,int ID,int eourseNum,float record)

考点:文件夹,考生