Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

the-pi-guy

Dec 16, 2017, 02:26 AM Last Edit: Dec 16, 2017, 02:50 AM by the-pi-guy
I just had an issue like that!

In c# I replaced the variable with a function that acted like a variable. Then it could print a message everytime it was changed and tell me who changed it. Does c++ have similar?
I think it's possible to have a pointer variable, that points to a function. 
Never tried it, but I recall reading something about it. 


I just had an issue like that!

In c# I replaced the variable with a function that acted like a variable. Then it could print a message everytime it was changed and tell me who changed it. Does c++ have similar?
I've been messing around some more. 

For some reason, this method is changing the value.  literally one line:
Code: [Select]

int getSize(int i)
return list[i].size;