Overloading...
Short question...
Does anyone use overloading that much... and if so what for and how often???
well if you mean operator overloading, thats used for classes, when you want to use addition symbols to add say a string to another string in your custom string class. also the = operator an be overloaded to allow comparisons and copying of strings etc. that help at all?
If we''re talking overloading functions, you can bet I use it =)
Here''s a common example for a graphics library:
(presudo code)
void DrawRect(CRGB rgb, CRect rect);
void DrawRect(int r, int g, int b, int x1, int y1, int x2, int y2);
"So much fun, so little time."
~Michael Sikora
Here''s a common example for a graphics library:
(presudo code)
void DrawRect(CRGB rgb, CRect rect);
void DrawRect(int r, int g, int b, int x1, int y1, int x2, int y2);
"So much fun, so little time."
~Michael Sikora
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement