I haven't met a Prof that took points off due to this. I believe for a beginner, it's good to include it in code to grasp the concept of functions and the concept of them returning values whatever its value.
Maniac, there is nothing wrong with the struct, but with the way in which you're trying to output its members values as others have already demonstrated:
Code:
#include <iostream>
using namespace std;
int main()
{
int index;
struct DOB {
int day;
int month;
int year;
};
DOB date[9];
for ( index = 0; index < 1; index++ ) {
cout << endl << "please enter the day ";
cin >> date[ index ].day;
cout << endl << "please enter the month ";
cin >> date[ index ].month;
cout << endl << "please enter the year ";
cin >> date[ index ].year;
}
cout << date[ 0 ].day << " " << date[ 0 ].month << " " << date[ 0 ].year << endl;
return 0;
}