可能性の重複:
Do the parentheses after the type name make a difference with new?
What do the following phrases mean in C++: zero-, default- and value-initialization?C++ベクトルinitilization
アイブ氏は何の問題もなくベクトルを使用しますが、私はまだそれについて質問があります。
vector<int>* v2 = new vector<int>();
私が何をするか()知っているが、いただきました!違い:私は常にこのようなコードを使用し 、そう
vector<int>* v1 = new vector<int>;
は、私が使用することができますか? v1では、ベクトルは整数を初期化しますか?
なぜ 'new'を使用していますか? 'ベクトル v1;の何が問題なの? –