C++: What's the difference between the code as shown below AND simultaneously omitting the keyword struct
in the functional declaration and definition -- code seems to work the same both ways ?
#include <iostream>
#include <string>
struct student{
int age;
int number;
};
void printme( struct student m[]); // if 'struct' is omitted the code works as fine
int main()
{
student s[3];
s[0].age = 10;
s[0].number = 333;
printme(s);
return 0;
}
void printme( struct student m[]){
printf("George age and number: %d, %d \n", m[0].age, m[0].number);
}