![Modernへの架け橋 - 神様なんて信じない僕らのために](https://cdn-ak-scissors.b.st-hatena.com/image/square/48981121024032a25aed123ccd5472890210b768/height=288;version=1;width=512/http%3A%2F%2Fecx.images-amazon.com%2Fimages%2FI%2F5115A4N9AZL.jpg)
テンポラリ・バッファとしての std::vector の利用 悩ましきテンポラリ・バッファ 一時的に必要となる領域、すなわちテンポラリ・バッファはプログラムのいたるところで用いられます。 void f() { char buffer[256]; ... } 上の例では256[char]のbufferをautomatic領域に確保しています。 場合によってはこのような固定サイズではなく、可変長のテンポラリ・バッファを必要とします。可変長のテンポラリ・バッファが必要なとき、通常opeartor newによってヒープ領域から確保するでしょう。 void f() { char* buffer = new char[N]; // Nは変数 ... delete[] buffer; } 当然のことながら、operator newによってヒープから確保した領域は、利用後速やかにoperator dele
C Library The elements of the C language library are also included as a subset of the C++ Standard library. These cover many aspects, from general utility functions and macros to input/output functions and dynamic memory management functions: <cassert> (assert.h)C Diagnostics Library (header)<cctype> (ctype.h)Character handling functions (header)<cerrno> (errno.h)C Errors (header)<cfenv> (fenv.h)F
STL samples :function :struct :class <algorithm> 適用 for_each 検索 find find_if find_end find_first_of adjacent_find search search_n mismatch lower_bound upper_bound equal_range binary_search 係数 count count_if 比較 equal lexicographical_compare 複写 copy copy_backward 交換 swap swap_ranges iter_swap 変換 transform 置換 replace replace_if replace_copy replace_copy_if 充填 fill fill_n generategenerate_n 削除 remove
STLFilt: An STL Error Message Decryptor for C++ Open Source Freeware by Leor Zolman, Supporting: Comeau C++ gcc 2.95.x/3.x/4.x (Dev-C++ compatible) MSVC++ 6/7/8/9 (incl. Dinkum Libraries) Metrowerks CodeWarrior Pro 7/8 Borland C++ / C++Builder Intel C++ 7/8 EDG Front End (Generic) Digital Mars C++ Please Note: Active Development on STLFilt has ended. The author sincerely hopes the C++ Standards Co
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く