+ 5

I came from the java world so I don't understand how it works

suppose I have a class A with a attribute of type B (another class) please take the idea, sorry for errors class B {} class A { public: B b; } what happens with B if I have const A a;

6th Jan 2018, 6:20 PM
killosl
4 odpowiedzi
+ 2
The object is still mutable internally. Same as with final in Java actually.
6th Jan 2018, 9:48 PM
1of3
1of3 - avatar
+ 1
what I mean is what happens to B is it constant too? thanks!
6th Jan 2018, 9:14 PM
killosl
+ 1
so if I understand well "the pointer" of the variable can't change thanks!
6th Jan 2018, 11:32 PM
killosl