#include"stdio.h" #include"malloc.h" #include#include"student.h" using namespace std; void add(student& b) { b.age++; } student get() { student temp; cin >> temp.age; cin >> temp.name; cin >> temp.score; return(temp); } int main() { int i; void add(student&); student get(); student a[30]; for (i = 0; i < 30; i++) add(a[i] = get()); }
class
#pragma once
class student
{
public:
int age;
char name[9];
float score;
};



