帮改C++错误谢谢!

[复制链接]
查看11 | 回复5 | 2012-12-7 22:08:20 | 显示全部楼层 |阅读模式
Student sb(name,num,arr[2]);修改成Student sb(name,num,arr);...
回复

使用道具 举报

千问 | 2012-12-7 22:08:20 | 显示全部楼层
的#include#包括文件 / /使用strlen需要这个头文件整型数; {私人类学生: BR />的char *; 的char * stuno 诠释score_num 双得分;:学生(){}; 学生(CHAR * N的char * M,整型数,双*) {名称=新的char [strlen的(N)...
回复

使用道具 举报

千问 | 2012-12-7 22:08:20 | 显示全部楼层
cannot convert parameter 3 from 'int' to 'int []'提示的很明白了。传的是指针,用数组名字就可以了。...
回复

使用道具 举报

千问 | 2012-12-7 22:08:20 | 显示全部楼层
#includeusing namespace std;#include //Student类class Student{string Name;int Num;int arr[3];public:Student(string,int,int *);int jisuan();};...
回复

使用道具 举报

千问 | 2012-12-7 22:08:20 | 显示全部楼层
int arr[2]; 不该出现arr[2]...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行