Please help error: no instance of constructor matches the argument list. And also please help explain about "strcpy(this->name, name);"
class Student {
char name[50];
char surname[50];
int age;
public:
Student(char name[], char surname[], int age) {
strcpy(this->name, name); // please explain this line what does it means?
strcpy(this->surname, surname);
this->age = age;
}
void Show() {
cout << "Name: " << this->name << endl;
cout << "Surname: " << this->surname << endl;
cout << "Age: " << this->age;
}
};
int main() {
Student A("Ivan", "Sidoroff", 25);
A.Show();
system("pause");
return 0;
}