Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Function Overloading, Copy Constructors, Default Arguements (http://www.programmingforums.org/showthread.php?t=11077)

RemoteC2 Aug 14th, 2006 11:53 PM

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.

Jimbo Aug 15th, 2006 12:44 AM

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 ;)

ReggaetonKing Aug 15th, 2006 12:50 AM

That sounds good to me too, I might just do that as well. Thanks Jimbo

Soulstorm Aug 15th, 2006 3:52 AM

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...

RemoteC2 Aug 15th, 2006 12:26 PM

okay, i am going to give that a try, thx!

King Aug 15th, 2006 1:09 PM

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