0
Where will we use operator overloading in game development?
I'm confused with operator overloading. I like game development and I wish to know where exactly is operator overloading is used while developing a game.
3 Antworten
+ 2
Overwatch
What Nick here describes is "only" the function or methode overload. This is something differend from an operator overload.
Here is a link, where you can find the explanation and examples for both :
https://www.tutorialspoint.com/cplusplus/cpp_overloading.htm
+ 1
Hmm, maybe when you're making a command in chat that either requires a username or something
!wave or !wave someone
In this case I'd add methods like:
void Wave() and void Wave(ulong id)
Wave() just simply does the wave animation, while the other one waves at a person you specify
but it's totally up to you how you want to develop it, games always need to be tested to enhance performance and to find any bugs
+ 1
Oh shoot, I didn't read the question right