vector string check if empty in if case in c++ code example Example: if vector is empty c++ v.empty() // returns true if vector v is empty