0

Const Methods - C++

1. How do I write a const method? Is it like so? : const void func(int i) const { } 2. Is the only place I can use const method is in a class? 3. What does every const in the above example mean? 4. What does it mean that a method is const like so?

23rd Sep 2021, 7:40 AM
Yahel
Yahel - avatar
1 Odpowiedź
23rd Sep 2021, 9:42 AM
Rupali Haldiya
Rupali Haldiya - avatar