D
davee
I have this function:
void update( MyType * m) {
updateMyType(m);
}
when 'update' returns the caller must see the changes made to m. But to
make this work correctly should 'update' not take a reference instead:
void update( MyType & m) {
....
When I use the first definition (using a pointer) its not always that
the content of 'm' is correct when 'update' returns. I assume there is
no such thing as a reference to a pointer?
void update( MyType * m) {
updateMyType(m);
}
when 'update' returns the caller must see the changes made to m. But to
make this work correctly should 'update' not take a reference instead:
void update( MyType & m) {
....
When I use the first definition (using a pointer) its not always that
the content of 'm' is correct when 'update' returns. I assume there is
no such thing as a reference to a pointer?