C++ Cheatsheet
This page is still very barebones. I’m just filling it out as I go.
Also, yes, I know this page is very unnecessarily verbose. I’ll be figuring out how to make it more concise.
Resources
References:
- cppreference.com
(en.cppreference.com)
Hello World
$ g++ -o a helloworld.cpp
$ ./a
#include <iostream>
int main() {
std::cout << "Hello World!" << std::endl;
return 0;
}
Containers
vector
#include <vector>
More Types
pair
#include <utility>
Algorithm Library
sort
#include <algorithm>