Hi, I have something like:


int MyInteger = 3;
int* getMyInteger()
{
return &MyInteger;
}


I'm using "int" as example... in my code I'm passing a quite complicated and huge class, so I prefer to send a pointer.

But I would like to say something like "yes, send the adreess of the variable but don't change its value" (just for security), "const" should do the job but I think it will say something like "don't change the adress of the pointer" (not the value itself).

It should be something easy to solve, but I don't find the clue. Do you know how I can do it?

thanks!