引用: C/C++ セキュアコーディング 第2版 by Robert C. Seacordら
at()メソッドは、添字演算子operator[]と同様に振る舞うが、pos >= size()の場合はout_of_range例外を発生させる。
try、catch(out_of_range&)でcatchできるとのこと。
Go to list of users who liked
More than 5 years have passed since last update.
引用: C/C++ セキュアコーディング 第2版 by Robert C. Seacordら
at()メソッドは、添字演算子operator[]と同様に振る舞うが、pos >= size()の場合はout_of_range例外を発生させる。
try、catch(out_of_range&)でcatchできるとのこと。
Register as a new user and use Qiita more conveniently
Go to list of users who liked