When to use const class member variables?

Pages: 12
Apr 8, 2024 at 8:24am
Ch1156 wrote:
Since the variables are in a class, maybe they don't even need to be const since they can't even be accessed without a mutator function anyways, right?

Yeah, you can control immutability though the public interface.
Apr 8, 2024 at 4:52pm
Ok, so its perfectly ok to use static const, and to make it non copyable when using polymorphism, awesome. ill make sure to write that stuff in my notes. Ill check out those links in the other posts, thanks for the help.
Topic archived. No new replies allowed.
Pages: 12