Hello, I was trying this "something" and I get this error:

'{' : missing function header (old-style formal list?)

Here's the code:

#include "stdafx.h"
#include <time.h>
#include <iostream>

using namespace std;



int tm_min;
int tm_hour;
int tm_mon;
int tm_year;

int main();
{

time_t rawtime;
struct tm * timeinfo;


/* Prompt user for date */
printf ("Enter the year: "); scanf ("%d",&year);
printf ("Enter the month: "); scanf ("%d",&month);
printf ("Enter the day: "); scanf ("%d",&day
time_t start,end;

/* Get current timeinfo and modify it to user's choice */
time ( &rawtime );
timeinfo = localtime ( &rawtime );
timeinfo->tm_sec = sec - 60;
timeinfo->tm_min = min - 60;
timeinfo->tm_hour = hour - 24;
timeinfo->tm_mon = month - 1;
timeinfo->tm_year = year - 1900;

/* Prompt user with time left until the user's date */
mktime ( timeinfo );

printf ("Time left until that date: %s.\n", timeleft[timeinfo->tm_hour]);

return 0
}