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?
1 Answer
+ 1
Yahel you'll get answers of all these questions..
https://docs.microsoft.com/en-us/cpp/cpp/const-cpp?view=msvc-160
https://www.geeksforgeeks.org/const-keyword-in-cpp/