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

#include
#include
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();

}

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


你可能感兴趣的:(C++,纠错,c++,input,math,c)