![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Jan 2006
Posts: 55
Rep Power: 3
![]() |
Function Overloading, Copy Constructors, Default Arguements
I have just finished a chapter in my C++ book that dealt with function overloading, copy constructors, and default arguments. i am not that imaginative (i know i should be as a programmer), and i was looking for ideas for a program that i could make using these 3 concepts...please dont flame for this, b/c i am just looking for some ideas.
|
|
|
|
|
|
#2 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 751
Rep Power: 3
![]() |
Write your own string class. Have multiple constructors, define your own operators, and put a few default arguments in somewhere. You could also write your own vector class, then use it to write your own string class... or something like that, to throw some templating in. If youve not done templates yet, start with a string class
![]() |
|
|
|
|
|
#3 |
|
Sexy Programmer
|
That sounds good to me too, I might just do that as well. Thanks Jimbo
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 239
Rep Power: 3
![]() |
I had the same idea a while ago, and I did it. I built a vector class and a string class. Although they are both implemented in a much better way in the STL, it's a very good begining to to understanding the basics of classes' abilities...
__________________
Project::Soulstorm (personal homepage) |
|
|
|
|
|
#5 |
|
Programmer
Join Date: Jan 2006
Posts: 55
Rep Power: 3
![]() |
okay, i am going to give that a try, thx!
|
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 371
Rep Power: 0
![]() |
Are you really ready for these more advanced topics? In your other thread you had a simple class all messed up. Maybe you should stick with more simplistic classes until you get the hang of it and then move into the more advanced topics. You should really take your time with learning c++, don't rush it.
__________________
I am Addicted to Linux! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiling Maverik 6.2 (from C) | megamind5005 | C | 16 | May 3rd, 2006 5:41 PM |
| libraries | matko | C | 1 | Jan 22nd, 2006 2:12 PM |
| Php Postgresql Class | Pizentios | Show Off Your Open Source Projects | 15 | Jun 28th, 2005 9:55 AM |
| Jackpot game | zorin | Visual Basic | 3 | Jun 10th, 2005 1:19 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |