![]() |
|
#1
|
|||
|
|||
DateI would like to make a program that will read dates under the formate dd mm yy and output it to gregorian style : day of the week, month dd yyyy. Program must be able to read dates from a file as far back as january1 1990, or 01 01 1990 to today, and must use the 2 following function files:
CPP / C++ / C Code:
CPP / C++ / C Code:
Problem is im not really sure how to incoperate it. I know how to read data from a file, then these programs will work on it, and then i can output the results, but how to get the to work is where i get stuck. |
|||
|
#2
|
|||
|
|||
Re: Dateis it impossible, no one knows for sure, no one cares (lol)??
|
|
#3
|
|||
|
|||
Re: DateQuote:
Quote:
Quote:
Yes that is it. I would say forget the file stuff for now. Start by picking one part of the date. Say the month. In your Example of "01 01 1990" it would be 1. So that is entered as an int. Now just look for the function that will convert an "int" to a type "oneMonth". So you are looking for a function that takes an int as a argument/parameter and returns a type "oneMonth". Do you see one that does that(oneMonth ConvertIntto_oneMonth( int MonthUser )? Write the code for main so that works/gives the results you want then move onto the next part you want to get working. ect ect ... |
|
#4
|
|||
|
|||
Re: Datewhat i wasnt sure how to do is call a function from the.h file.
|
|
#5
|
|||
|
|||
Re: DateCPP / C++ / C Code:
error, cant find file oneMonth.h.... its in the same directory.... |
|
#6
|
|||
|
|||
Re: DateQuote:
That notation tells the compiler to look in its installation directories for the header. The easiest way to tell the compiler to look into the same directory (where the source file is), is to use CPP / C++ / C Code:
Regards, Dave |
|
#7
|
|||
|
|||
Re: Datehaha
|
|
#8
|
|||
|
|||
Re: Dateughh... i get the following errors for my oneMonth file
c:\documents and settings\eah8340\mes documents\udm\automne 2006\info1001\labos_info1001\devoir_06\1\onemonth. h(39) : error C2065: 'monthUser' : undeclared identifier C:\Documents and Settings\eah8340\Mes documents\udm\Automne 2006\INFO1001\Labos_INFO1001\Devoir_06\1\date.cpp( 5) : error C2874: using-declaration causes a multiple declaration of 'cout' d:\program files\microsoft visual studio\vc98\include\iostream(1 C:\Documents and Settings\eah8340\Mes documents\udm\Automne 2006\INFO1001\Labos_INFO1001\Devoir_06\1\date.cpp( 6) : error C2874: using-declaration causes a multiple declaration of 'cin' d:\program files\microsoft visual studio\vc98\include\iostream(17) : see declaration of 'cin' |
|
#9
|
|||
|
|||
Re: DateQuote:
At least it found the file, and that's a Good Thing, right? However... Showing us the error messages that came from onemonth.h without showing us what's in the file is not likely to be productive. Post the code. Regards, Dave |
|
#10
|
|||
|
|||
Re: Datethe code from onemonth and oneday are posted in my first post all the way up top
|
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with Overloaded Constructors and Class within Class | jdbrine | C++ Forum | 2 | 10-Jul-2006 22:14 |
| Current Date (Short Date) In C | Vishy80 | C Programming Language | 2 | 07-Jun-2005 13:54 |
| Limit combo box and date time picker choice according to database created in folder | shinyhui | C++ Forum | 0 | 22-Feb-2005 20:16 |
| Limit combo box and date time picker choice according to database created in folder | shinyhui | MS Visual C++ / MFC Forum | 0 | 22-Feb-2005 02:13 |
| Rookie problem with date format | cave monkey | MySQL / PHP Forum | 4 | 18-Mar-2004 08:41 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The