Hi,
I need to do a program that shows the date in this format, 12-jul-2002 from a number input. I´m using this struct:
On main I call buffer with:Code:typedef struct { unsigned char day; unsigned char month; int year; } Tdata; The months are saved in. char months[12][4]={"Gen","Feb","Mar","Abr","Mai","Jun","Jul","Ago", "Set","Oct","Nov","Des"}; Then I use this function: int obtenirData( TData *d, char *text ) { */ analizes text and asigns a data to the structure Tdata and retorns -1 if error and 0 if ok. /* return 0; } Then I use this function: void donarData( Tdata *d, char *buffer) { // writes in buffer a string that contains the data in d // Doesn´t return anything }
gets(buffer);
My question is how to get the numbers without using scanf and how to put them in the struct Tdata??
Please help me, Im going crasy....
Thanx.
Code Tags added by kermi3



LinkBack URL
About LinkBacks


