Skip to main content
gamedev.net
🔒 Locked

Overloading...

Started by ratt1233 Nov 15, 2001 at 5:36 PM 1 replies 900+ views
Original Post
ratt1233
ratt1233
Short question... Does anyone use overloading that much... and if so what for and how often???
"Man has got to know... his limitations..."
vaneger
vaneger
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?
Guardian_Light
Guardian_Light
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.