hello it is easy program but there is a mistake in void application
while printing the birthday, pt pointer gives a mistake why?
#include <cstdlib>
#include <iostream>
#include <conio.h>
using namespace std;
struct Date
{
int day;
int month;
int year;
};
void printdate(Date* pt)
{
cout << "\nbirthday= "<<*pt->day<<"."<<*pt->month<<"."<<*pt->year;
}
int main(int argc, char *argv[])
{
Date t;
t.day=11;
t.month=11;
t.year=2009;
printdate (&t);
getch();
}