As simple as this: I want to specify that a function would not change its pointer argument. How to?
class A {
private:
int *p;
public:
void foo (const int *q) {
p = q;
}
};
A a;
int b = 3;
int *c = &b;
a.foo(c);
Still not working, thanks for the help!