
16 Apr
2004
16 Apr
'04
3:07 p.m.
As I'm sure you all are aware of in C# when you specify a function like
"Mårten Rånge" <marten.range@tapiren.com> wrote in message news:20040415161750.1D99437E66@smtp2-2-sn4.m-sp.skanova.net... [snip] this
void do_stuff(ref int i) { ++i; }
You have to call it like this:
int l_i = 4233; do_stuff(ref l_i);
You see at the place the call is made that l_i might be modified by do_stuff. I would love to have that in C++. Could you design the arguments of a function so that the compiler requires you to write something like this?
perhaps if operator.() could be overloaded. You could use a pointer instead. br Thorsten