| | |
how many days in each month?
![]() |
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
I don't really care about date/time programming, but I just wanted to start a program that could possibly give me some good experience. I'm most interested in getting more experience with pointers and references, so I thought I could implement something in the date class I was making, but was wrong.
See, the two functions I have return dates, because that seems to be the most sensible approach:
Date Date::add(Date addThis)
{
}
At first I was hoping for a function that used references or pointers, but it would turn out messy, and kind of stupid:
void Date::add(Date addThis, Date &ref)
{
}
The only way I could think of using references was to provide a second paramenter, which seems like a terrible solution.
I hope you see what I'm getting at even though I don't write very clear!
Anyways, I'm reading three different books and got more than enough experience with refs and pointers with in text reading, but I want hands on experience. I just can't seem to find something useful to do. I mean, almost everything I think can be done returning the object rather than using a reference.
Any of that make sense!
See, the two functions I have return dates, because that seems to be the most sensible approach:
Date Date::add(Date addThis)
{
}
At first I was hoping for a function that used references or pointers, but it would turn out messy, and kind of stupid:
void Date::add(Date addThis, Date &ref)
{
}
The only way I could think of using references was to provide a second paramenter, which seems like a terrible solution.
I hope you see what I'm getting at even though I don't write very clear!
Anyways, I'm reading three different books and got more than enough experience with refs and pointers with in text reading, but I want hands on experience. I just can't seem to find something useful to do. I mean, almost everything I think can be done returning the object rather than using a reference.
Any of that make sense!
>I'm most interested in getting more experience with pointers and references
Write a balanced binary search tree. That will give you plenty of experience with pointers. See below for a recommendation to get a handle (pun intended) on references.
>which seems like a terrible solution.
Probably because it is.
>I mean, almost everything I think can be done returning the object rather than using a reference.
Create your own stream. You'll be forced to use references heavily.
Write a balanced binary search tree. That will give you plenty of experience with pointers. See below for a recommendation to get a handle (pun intended) on references.
>which seems like a terrible solution.
Probably because it is.
>I mean, almost everything I think can be done returning the object rather than using a reference.
Create your own stream. You'll be forced to use references heavily.
New members chased away this month: 3
![]() |
Similar Threads
- Difference between 2 dates by month (MS Access and FileMaker Pro)
- seg fault when accessing the array (C)
- Sudhakar here (Community Introductions)
- Disappearing DVD Drive (Storage)
- Textlink ads on free forum/blog service - $4/mth - 10,000+ uniques/month (Ad Space for Sale)
- Help with Class, stuck. (C++)
- Do while Loop to display a choosen month and the dates in it (ASP)
- computer keeps randomly crashing [not crc worm] (Windows NT / 2000 / XP)
Other Threads in the IT Professionals' Lounge Forum
- Previous Thread: Symantec Global Security Vuneralbility Report
- Next Thread: My account feture
| Thread Tools | Search this Thread |
Tag cloud for IT Professionals' Lounge
1gbit advertising advice archive british broadband business businessprocesses career carrier censorship cern china cio collectiveintelligence connectivity consumers corporateearnings css datatransfer debtcollectors dictionary digg digital ebay ecommerce email employment environment facebook food government grid high-definition hottub infodelivery infotech intel internet interview ipod isp japan kindle lhc library malware marketing mit news onlineshopping php piracy piratebay pope porn program questions r&d religion remoteworking research retail schools security sex shopping simple skype smallbusiness smb sms socialmedia socialnetworking software softwareengineer spam speed spending ssl startrek statistics stocks study stumbleupon survey tabletpc technology touch-screen touchscreen training twitter uk vbulletin voips web webdesign webdeveloper windows words






