私はこのコードを持っています:
size_t count = new_data.size();
std::cout << "got the count: " << count << std::endl;
double g_x[count];
std::cout << "First array done\n";
double g_y[count];
std::cout << "Allocated array of size" << count << std::endl;
出力が得られます:
got the count: 1506538
Segmentation fault: 11
理由は正直わかりません。別のデータセットでは機能しますが、このデータセットでは機能しません。