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.

14th Sep 2021, 4:41 PM
Overwatch
Overwatch - avatar
3 ответов
+ 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
14th Sep 2021, 9:58 PM
Coding Cat
Coding Cat - avatar
+ 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
14th Sep 2021, 4:53 PM
Tim
Tim - avatar
+ 1
Oh shoot, I didn't read the question right
15th Sep 2021, 5:19 AM
Tim
Tim - avatar