5,323
edits
No edit summary |
|||
Line 4: | Line 4: | ||
How to do things using the [https://en.wikipedia.org/wiki/C%2B%2B_Standard_Library C++ standard library (stdlib)]. | How to do things using the [https://en.wikipedia.org/wiki/C%2B%2B_Standard_Library C++ standard library (stdlib)]. | ||
===Compilation=== | ===Compilation=== | ||
{{See also|CMake|Makefile}} | |||
====g++==== | ====g++==== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 11: | Line 12: | ||
* <code>-std=c++17</code> for C++17 support | * <code>-std=c++17</code> for C++17 support | ||
* <code>-O3</code> for level 3 optmizations | * <code>-O3</code> for level 3 optmizations | ||
===Arrays=== | ===Arrays=== | ||
In C++, you can use <code>std::vector</code> which gives you a resizable array. | In C++, you can use <code>std::vector</code> which gives you a resizable array. |