#include <iostream>
using namespace std;
struct date
{
int month[2];
int day[2];
int year[4];
char dummy[1];
};
int main()
{
date birthday;
cout << "\nPlease enter your birthdate (mm/dd/yyyy): ";
cin >> birthday.month >> birthday.dummy << birthday.day >> birthday.dummy << birthday.year;
cout << "\n\nYour birthday is on "<< birthday.month << "/" << birthday.day << "/" << birthday.year;
return 0;
}
im having problems with the cin statements. here is the error message im getting:
error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'int [2]' (or there is no acceptable conversion)
what am i doing wrong? the dummy[1] variable is to take in the "/" in the date format. i tried it without that. i just wont compile! please help!



LinkBack URL
About LinkBacks



.