How to overload % operator | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to overload % operator

How can I overload modules operator in C++, kindly explain and provide me an example. Thank You

25th Sep 2023, 9:57 AM
Harsh Maurya
Harsh Maurya - avatar
1 Resposta
0
You can overload it just like +, - or any other operator in C++. there is not any difference. Second operand will be passed as argument to the overload function and you can return whatever you want after processing it
29th Sep 2023, 11:29 AM
šŸŒ€ Shail Murtaza Ų“Ų¹ŪŒŁ„ Ł…Ų±ŲŖŲ¶ŪŒŁ°
šŸŒ€ Shail Murtaza Ų“Ų¹ŪŒŁ„ Ł…Ų±ŲŖŲ¶ŪŒŁ° - avatar