im tryin to get user input od a date and than get the week number so far i have lernt how to do the week number but need help in getting a date frome user input
so far:

int week;
 char date[3];
 struct tm tim;
 time_t now;
 now = time(NULL);
 tim = *(localtime(&now));
 week = atoi(date);
 cout << week;



Why? the tm structure already contains the weekday in numeric form. Just use it.