#How do i to write this line of code into a getter and setter

1 messages · Page 1 of 1 (latest)

rocky path
#

what do you mean by setter and getter, it's already that, you mean like a C# property ?

#

also getCost() should compute once if nothing was changed

#

also this is C++ not C 80 so not sure why you predeclare variable at the top of the function