C++ booking system

i have created a reservation system and want get to the next level
the system is a cruise ship with three levels. Each level conatins different cabin classes
i have done a 3d array ie cabin[row][column][level] and there is 52 cruises throught out the year
now what i have done works reads,writes [there are 52 text files this was easier with the availability details] etc but now i want to take it further and have the user input a date instead of cruise number (1-52) and need a way or someone to point me in the right direction.
LVL 4
bobby101Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

George TokasCommented:
The most simple way:
Take as input the date.
Convert it to a number.
Example:
April 7 2010 = 04072010
This will be your next data text file.

George Tokas.
0
bobby101Author Commented:
ok, i have 52 files names roomBooking1.txt ... 52 so do i change the file names to the numeric date?
0
bobby101Author Commented:
how do i get week number of a given date?
0
bobby101Author Commented:
so far i have done this:
int week;
 char date[3];
 struct tm tim;
 time_t now;
 now = time(NULL);
 tim = *(localtime(&now));
 strftime(date,3,"%W",&tim);
 week = atoi(date);
 cout << week;
just to get the week number of today but
i want the user to input a date is 19/4/2010
and it picks it up to get the week number, please help!!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.