![]() |
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.
|
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 ;)
|
That sounds good to me too, I might just do that as well. Thanks Jimbo
|
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...
|
okay, i am going to give that a try, thx!
|
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.
|
| All times are GMT -5. The time now is 12:52 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC