C++ Built-in methods

In this lesson, we'll discuss some essential built-in C++ methods.

We'll cover the following...

Min / Max

Compare two integers and get minimum or maximum using a built-in function.

int a = 7;
int b = 4;
int M = max(a, b) // 7
int m = min(a, b) // 4

Swap

Use the built-in swap method to swap two variables of the same type.

int a = 5, b = 8;
swap(a, b);

Auto

The auto keyword ...