Code:
struct Date {
int y, m, d;
Date(int y, int m, int d);
void add_day(int n);
};
The bolded line above declares a constructor for the struct.
Code:
int main()
{
Date today(2010, 06, 16);
The bolded line above calls the constructor. The problem is you haven't defined the constructor anywhere in your code. You need to actually create the function that you've said exists and are trying to call.
It's like you create a function prototype and call that function but you haven't actually written any code for the function:
Code:
int foo(int bar); <- Prototype the function "foo"
int main()
{
foo(1); <- Call function already prototyped but where is the actual function code?
return 0;
}