I am wondering if I should return constint* in the method MyClass::getMyPointer()? Is there any problem in returning constint& as I did? I find the latter more convenient when I need to use the object pointed by myPointer.
There isn't really a difference except with the const int* version you would have to use '->' instead of '.'. Go ahead and use whichever one seems better in your case.