1 messages · Page 1 of 1 (latest)
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