Jump to content

C++: Difference between revisions

5 bytes added ,  13 April 2020
Line 18: Line 18:
====Main====
====Main====
All C++ programs launch in a <code>main</code> function.
All C++ programs launch in a <code>main</code> function.
Similar to [[C]], the arguments are <code>int argc</code> and <code>char *argv[]</code>.
Similar to [[C]], the arguments are <code>int argc</code> and <code>char *argv[]</code>.<br>
These can be easily converted to a <code>std::vector<std::string></code> for convenience.
These can be easily converted to a <code>std::vector<std::string></code> for convenience.
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
#include <string>
#include <string>