Skip to content

Instantly share code, notes, and snippets.

@kiprasmel
Created March 8, 2019 11:04
Show Gist options
  • Save kiprasmel/2ce1ac0f5888ca579b3078d781f469d0 to your computer and use it in GitHub Desktop.
Save kiprasmel/2ce1ac0f5888ca579b3078d781f469d0 to your computer and use it in GitHub Desktop.
C++ misc
/**
Graph implementation (edges) (look at example 2):
https://www.techiedelight.com/graph-implementation-using-stl/
C++ containers:
https://en.cppreference.com/w/cpp/container
N = max(N, max(a, b))
foo = (foo + bar + const) % const
Assuming CodeBlocks:
1. Settings > Compiler > "Have g++ follow C++14 / 17 / whatever the newest & supported version is";
2. Settings > Editor > Code completion > Disable SmartSense (unticked) (better code completion)
g++ full:
task="TASK-NAME-NO-EXT"
g++ -DEVAL -std=c++11 -O2 -pipe -static -s -o $task $task.cpp
g++ short:
task="TASK-NAME-NO-EXT"
g++ -std=c++11 -static -o $task $task.cpp
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment