473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

date programme

17
hi everyone,
would u please help me! i want to write programme that contain 3 files, 2 with cpp suffix (like date.cpp & testDate.cpp) and 1 with h suffix(like date.h), i want to write function prototype in date.h file and put down main function in testDate.cpp file and put down trunk of function in date.cpp file.
i want the programme operates like this:if i put xth day of year , it gives me date of that day and on the contrary.
what function should i use? and what should i write in main function?
thanks
Apr 21 '07 #1
3 1398
ilikepython
844 Expert 512MB
hi everyone,
would u please help me! i want to write programme that contain 3 files, 2 with cpp suffix (like date.cpp & testDate.cpp) and 1 with h suffix(like date.h), i want to write function prototype in date.h file and put down main function in testDate.cpp file and put down trunk of function in date.cpp file.
i want the programme operates like this:if i put xth day of year , it gives me date of that day and on the contrary.
what function should i use? and what should i write in main function?
thanks
Hi,
What have you tried? You want the function to give you the date of a certain day, right? From main you should call your function and it should return a value and you then print that value out in main. What have you done so far on writing the function?
Apr 21 '07 #2
appy
17
thanks alot for ur guidance
yea, u,r right!
would u please tell me what function should i use?and how? or introduce me some useful site that can help me to write this programme
thanks again
Apr 21 '07 #3
Ganon11
3,652 Expert 2GB
You should probably use your own function. You'll have to come up with the logic to determine the date depending on the day number. You should consider how many days are in each month and whether or not the given year is a leap year.
Apr 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: cm012b5105 | last post by:
Hello i want to put an interactive text programme in to a graphical box this is a small section of my text programme s = raw_input ("Hello whats your name? ") if s=='melvyn': print "your my...
0
by: melledge | last post by:
Full Programme for XTech 2005 Announced Premier European XML Industry Event Expands Focus to "XML, the Web and Beyond"; Co-hosted by the Mozilla Foundation,W3C, and OASIS, Presenters Include...
2
by: NDAKI MBOULET | last post by:
J'ai un problème pour écrire un programme. Voici mon sujet: Ecrire en c++ un programme qui reçoit en entrée une suite d'instruction encadrées par les mots clés BIBODLE et LISUK dans un langage...
5
by: katekukku | last post by:
HI, I need the source code for a programme in C. It should have the basic features of a paint programme like circle, line etc, etc,. I lost a programme which wa driven by keyboard, if somebody...
13
by: priyasmita_guha | last post by:
Here is a program- /* PROGRAM: To find the difference between two dates */ #include<dos.h> #include<stdio.h> #include<conio.h> #include<process.h> void valid_date(int,int,int); int...
16
by: Bishman | last post by:
This is driving me mad, should be simple, How can I format a date string "01122006" to be "01/12/2006" I have tried string teststr = String.Format("{d}","01122006"); AND string teststr =...
18
by: arnuld | last post by:
i compiled the "hello world" programme from K&R2: #include<stdio.h> int main() { printf("hello world\n"); }
4
by: arnuld | last post by:
this is my final code. Can you folks advise some improvements for making this programme better? BTW, i aways compile my programme with this cmmand on Linux: g++ -ansi -pedantic -Wall -Wextra...
6
by: =?ISO-8859-1?Q?FERHAT_A=C7ICI?= | last post by:
hi everyone...I want to run any programme or file with my programme.example any file or programme, like this "xxx.ncn".I want If users double click this xxx.ncn this file can run by my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.