But realize that a string is really a bunch of data behind the scenes: a length plus a pointer to a character array allocated elsewhere. An int is just a a raw 32-bit value.
The original example of "x.keepin(0,800)" is a classic case where you don't want OOP. All you want is"x = keepin(x,0,800)" or "keepin(x,0,800)" depending on whether you want to pass x by reference or value. In other words, just a function, not an object.
The original example of "x.keepin(0,800)" is a classic case where you don't want OOP. All you want is"x = keepin(x,0,800)" or "keepin(x,0,800)" depending on whether you want to pass x by reference or value. In other words, just a function, not an object.