Please help to check with the copy integer part... I have no idea...
Thank you!
Code:struct studInfo{
char name[256];
int age;
};
struct studInfo infoArray[1024];
int studCount = 0;
void addStudent(char* name, int age) {
if(name == NULL)
return;
if(age <= 0)
return;
strcpy(infoArray[studCount].name, name);
/*Problem Here!, I dont know how to copy integer to struct */
infoArray[studCount].age = age;
}