How to compare elements of a vector against each other? C++
I am supposed to read some data (specifically string datatype) and store each element in a vector. Now I have to check if any of the different strings that were inputted match in size, and if they do I have to see if there are any matching letters. Now my question is how do I compare what's inside the vector (first the size and then the different letters). Is it possible? Say I have HELLO and HELLA They have the same size, and 4 letters that match. This is what I am trying to accomplish. The code that I have does not work given my ignorance about the matter. vector <string> myVector; //insert
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.