U
Urs Thuermann
I'm working on a project that uses const for function parameters that
are neither references nor pointers, i.e. something like this:
int foo(const int a) { ... }
int bar(const string b) { ... }
I don't see why this is useful. Since the argument is copied to the
called function it doesn't matter to the caller whether the argument
is modified or not. So why would one want to write code like that?
urs
are neither references nor pointers, i.e. something like this:
int foo(const int a) { ... }
int bar(const string b) { ... }
I don't see why this is useful. Since the argument is copied to the
called function it doesn't matter to the caller whether the argument
is modified or not. So why would one want to write code like that?
urs