We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fff4b6 commit afb92d7Copy full SHA for afb92d7
src/hdgeant4.cc
@@ -78,12 +78,12 @@ int main(int argc,char** argv)
78
}
79
// Convert filtered_args to argc and argv format
80
int filtered_argc = filtered_args.size();
81
- char* filtered_argv[filtered_argc];
+ std::vector<char*> filtered_argv;
82
for (int i = 0; i < filtered_argc; ++i) {
83
- filtered_argv[i] = const_cast<char*>(filtered_args[i].c_str());
+ filtered_argv.push_back(const_cast<char*>(filtered_args[i].c_str()));
84
85
// Initialize the jana framework
86
- DApplication dapp(filtered_argc, filtered_argv);
+ DApplication dapp(filtered_argc, filtered_argv.data());
87
auto app = dapp.GetJApp();
88
app->Initialize();
89
0 commit comments