私はどのスタイルを使用すべきかcスタイルの関数とやり取りしています。ベクトルvs unique_ptrからcスタイルへの関数
私は、c関数から戻った後にベクトルにデータを格納する予定です。どちらが有利なのは何ですか?この場合
{
auto test = std::make_unique<double[]>(10);
fooCstyle(test);
}
または
{
auto test = std::vector<double>;
test.reserve(10);
fooCstyle(test);
}
をあなたが呼び出したい関数のシグネチャと意味は何ですか? –
fooCstyle(double配列[]、size_t sizeOfArray); – CodeSlapper