#include "StudentControl.h"
StudentControl::StudentControl()
{
}
StudentControl::~StudentControl()
{
}
void StudentControl::inputStudent(Student student) {
studentList[count] = student;
count++;
cout << "입력완료!" << endl;
}
void StudentControl::deleteStudent() {
// 배열에 값이 있는경우만 삭제
if (count != 0) {
// 학생배열 끝에서부터 삭제
studentList[count - 1] = studentList[count];
count--;
}
else {
cout << "학생 데이터가 존재하지 않습니다" << endl;
}
}
void StudentControl::inqStudent() {
cout << "==============================" << endl;
cout << "=== 학생 목록 조회" << endl;
cout << "==============================" << endl;
for (int i = 0; i < count; i++) {
cout << "학생" << i << " 이름 : " << studentList[i].getName() << endl;
cout << "학생" << i << " 나이 : " << studentList[i].getAge() << endl;
cout << "학생" << i << " 학번 : " << studentList[i].getStudentId() << endl << endl;
}
}
Student student 이 부분이 이해가 안가는게 inputStudent 함수의 매개변수(파라미터)의 자료형이 Student가 될 수 있나요..?? Student는 앞선 코드에서 클래스로 정의했던 부분인데 이게 되는 건가???궁금해서 질문 올립니다
글 좀 똑바로 써라 뭔소리냐 도대체