I was trying to create a program that takes arguments by command line, using main() function arguments. As a (basic) C++ programmer (even if I know quite well pointers and array in C-style) I hardly ever used char* strings and C-arrays. I spent some to take main() arguments and transform it in std::string… So asked myself: why in C++ the main() function is not overloaded to take an std::vector<std::string> argv instead of the old char* argv[]?
For “overload” I mean the coexistence of main() functions like int main() and int main(int argc, char *argv[]), not the overloading of a normal function made by the programmer.
Why isn’t it in the standard? Simple:
Because nobody proposed it.
Things go into the C++ standard because someone writes a proposal for it, then gets other people to vote on it and incorporate it. Unless someone actually wants it to happen, it doesn’t get to happen.
And considering how trivial this feature really is:
There just isn’t any real need for it. It’s a convenience function, and it doesn’t even make things that convenient compared to the alternative.