View Single Post
Old Nov 4th, 2006, 5:54 AM   #5
Iftikhar
Programmer
 
Iftikhar's Avatar
 
Join Date: Oct 2006
Location: London
Posts: 40
Rep Power: 0 Iftikhar is on a distinguished road
Send a message via MSN to Iftikhar
There are several other ways to pass input a date in function. There are also structures for date time in C/C++, and doing mathematics with them is easy. Still If you want to continue with the date input as string in functions then you have to carry on the following steps
1. loop through date string until '\' is encountered and save it to another string say s_day chracter by chracter. When \ set null at end.
2. Convert it into an interger by using atoi() function.
3. Similary continue scaning the string and putting month and year in seperate strings and converting them to integers. Now do mathematics with them and convert them again insto string
__________________
Iftikhar Ahmed Khan
For doing an experiment on programmer's mood please visit http://uxisfyp1.brunel.ac.uk/cspgiak
Iftikhar is offline   Reply With Quote