Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Header files contain declarations of functions and classes. The #include directive copies the header contents into your file before compilation.
#include <iostream> #include <vector>
Uses angle brackets — searched in system directories
#include "myfile.h" #include "utils.h"
Uses quotes — searched in current directory first
<iostream>Input/Output streams (cin, cout)<cmath>Math functions (sqrt, pow, abs)<string>String class and operations<vector>Dynamic array container<algorithm>sort(), find(), max(), min()<cstdlib>General utilities (rand, exit)Use #include <bits/stdc++.h> to include everything at once. Only works with GCC — not portable, but saves time in contests.