|
|
|
|
#include <algorithm>
and use std::sort
to sort things, but it is more convenient if you sort numbers, strings etc. when you input them into a vector. and in the previous code you entered when you type the variables in the for
loops declare them as integers because they are being used in new scopes.