Take this dummy structure:
struct foo
{
    int* pI;
    void bar() const
    {
        int* ptrToI = pI; // I want this to require 'const int*'
        *ptrToI = 5; // I want this to fail
    }
}__test__;
How can I design this struct to prevent me from changing the value pI points to?
 
     
    