Code:
#include <iostream>
#include <conio.h>
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);
cin >> *(birthday.year);
cout << "\n\nYour birthday is on "<< *(birthday.month) << "/" << *(birthday.day )<< "/" << *(birthday.year);
getche();
return 0;
}
notice: you got 2 errors in your code
1- the type mistake (as i think) << instead of >>
2- u used the name of the arrays to assign value, while the name of any array is just a pointer to its first element. so you have to treat it as a pointer
I hope this helps you