[Dev-C++] Super charging the string class
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: David M. <ci...@ya...> - 2003-07-04 16:50:43
|
I am currently writing a heavy text-processing application. As far as I can see the string class is not implemented uniformly. I wish to fill in the gaps as well as add a few extras that are used on a regular basis in the program (not the least of which are overloading the =, << and += operators). What would be the best way to do this? I was thinking create a class that inhereted from the string class and make my changes to that class. The only thing I am a bit curious about with this method is what happens if I override a function that exist on one of the platforms. How can I check for it's existence at compile time (Odds are the compiler writer's implementation is faster or more stable than mine). Another thing I saw and would like an opinion on is making all my overloads global. (i.e. instead of being part of the class they are normal functions thet implement the overloads). I see this getting a bit unweildly though. --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! |