replacing the command line arguments int argc and char** argv with std::vector<std::string>
问题 Following this post, where I have found a temporary workaround for my other problem, I want to know if I can replace the int argc, char** argv with a std::vector<std::string> variable/object. Consider the imaginary code: #include <iostream> #include <CloseLibrary> void someFunction(int argc, char** argv){ for (int i = 0; i < argc; ++i) { std::cout << argv[i] << std::endl; } } int myFunc(int argc, char** argv){ someFunction(argc, argv); return 0; } where the CloseLibrary is a closed library