C++菜鸟一枚,求教求教~

#include<iostream>
#include<string.h>
using namespace std;


class Stduent
{
private:
char name[20];
int number;
int chinese;
int math;
int english;
public:
Student(char a, int b, int c, int d, int e)
{
name[0] = a[0];
number = b;
chinese = c;
math = d;
english = e;
}
stduent(char a, int b)
{
name[0] = a[0];
number = b;
chinese = 0;
math = 0;
english = 0;
}
void print()
{
int i;
printf("name is:");
for(i = 0 ; i < strlen(name) ; i ++)
{
printf("%d", name[i]);
}
printf("\number is:%d", number);
printf("\nhinese is:%d", chinese);
printf("\nath is:%d", math);
printf("\nnglish is:%d", english);
}
};


void main()
{
Stduent A, B;
char a[20];
int b, c, d, e;
printf("please input the name:\n");
scanf("%s", a[20]);
printf("please input the number:\n");
scanf("%d", b);
printf("please input the chinese:\n");
scanf("%d", c);
printf("please input the math:\n");
scanf("%d", d);
printf("please input the english:\n");
scanf("%d", e);
A.Student(a[0], b, c, d, e);
void print();
A.stduent(a[0], b);
void print();

}

报出来的那两个错怎么改?


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值