Quote:
Originally posted by zMan
I don't see how we would be able to justify a class for this function since it is only really a function in VB and not an object. The simplest approach would be to create a function that takes four arguments instead of three.
Something like this.
Mid(s1, 3, 0, "123");
So? The rules in VB don't carry over to C++. The objective of the subjective contest was to try and duplicate the functionality and syntax of this VB "function", not to devise the simplest approach to substring replacement.