how to take the length of an strign in c++ code example Example: length of string in c++ str.length();