s/c++14/c++17

This commit is contained in:
Jonathan Paulson 2020-06-18 21:17:12 -04:00
parent be3daa76c2
commit 87a97edd23

View file

@ -170,7 +170,7 @@ gedit ~/.zshenv
You can add aliases and functions here, such as the following to compile and run C++.
```sh
co() { g++ -std=c++14 -O3 -o $1 $1.cpp -Wall -Wextra -Wshadow -DLOCAL -Wl,-stack_size -Wl,0xF0000000; }
co() { g++ -std=c++17 -O3 -o $1 $1.cpp -Wall -Wextra -Wshadow -DLOCAL -Wl,-stack_size -Wl,0xF0000000; }
run() { co $1 && ./$1 & fg; }
```
@ -184,9 +184,11 @@ Note that all occurrences of `$1` are replaced with `name`.
# Flags
-O3 tells g++ to compile your code to run as fast as possible.
-std=c++14 allows you to use features that were added to C++ in 2014.
-std=c++17 allows you to use features that were added to C++ in 2014.
-Wall -Wextra -Wshadow checks your program for common errors.
You should always compile with these flags; define an alias (as explained above) so you don't need to type them every time!
# Tools
## IDEs