how to check if a vector is empty in c++ code example Example: if vector is empty c++ v.empty() // returns true if vector v is empty