×
日本語のページを検索
  • すべての言語
  • 日本語のページを検索
すべての結果
事前にサイズのわからないファイルを読み込むときなど、途中でサイズの変えられる配列を使いたいことがあります。C言語なら realloc() を用いれば実現できますが、C++の ...
2021/05/29 · c++のvectorではresizeとassignという機能があります。僕は今までresizeではサイズの指定だけ、assignはサイズと中身、とイメージしていたんです ...
2023/03/20 · C++17以降 : 後ろから size() - sz 個の要素を削除する. もし sz が現在のコンテナの size() より大きい場合、 sz - size() 個だけ値初期化 ...
関連する質問
Resizes the container so that it contains n elements. If n is smaller than the current container size, the content is reduced to its first n elements, ...
2020/11/23 · 解説①. Copied! resize(img, img, Size(), 0.5, 0.5);. さっきのコードに これを追加させるだけです。最初のimgは入力画像で二つ目のimgは出力画像です。
2024/03/01 · vector : : resize() in C++ STL · Syntax: · 1.Size of the vector container is lowered. · 2. Size of the vector container is increased. · 3.Size ...
2021/11/10 · Vector capacity is never reduced when resizing to smaller size because that would invalidate all iterators, rather than only the ones that would ...
2023/06/16 · サイズの動作について、SizeSettings 型を使用して同じ操作を行います。 たとえば、ダイアログ ボックスのサイズを変更するときにコントロールがサイズ ...
2022/10/06 · 概要. 文字列の長さを変更する。 要件. n <= max_size(). 効果. n <= size() のとき、元の文字列末尾の size() - n 要素を削除する。 n > size() の ...