For a container class, what behavior should be when the class of the user tries to set a value outside the class size ?
There is a "replacement" method (such as I could throw an One exception to the limit is more appropriate here because the word "replacement" usually means the word That the caller assumes that the data in the specified index is not, which is not. operator [] ) rather than "one" method in question (such as
operator + = ).
out_of_range exception, or I could adjust to change the size of the container.
Comments
Post a Comment