Recognising and comparing poker hands
Overall, I can't quite tell how this is supposed to be structured.  It looks like it all belongs to a single function which has been omitted.  In either case, different things are happening here, so they should be separated into additional functions as such.

For instance, each section you've already preceded with a comment should have a function.  They may all do card operations, but their purposes still differ.  If someone needed to find a certain area to examine, then that would take more time to find, even with comments.
Since you're already using C++11, you can change all of your vector::iterators to auto, which will help keep your code simpler.

Better yet, you can just use a range-based for loop:

for (auto&amp; it : cards) {}

This isn't very idiomatic:


(*it)[0]



Since this vector contains std::strings, you can use std::string::front() to acquire the first character from an element:

it.front();


Note: the . operator here may only work if you follow my second suggestion.  Otherwise, you may need to use the -&gt; operator.
This is really hard to read and maintain:


if(cards[0][1] == cards[1][1] &amp;&amp; cards[1][1] == cards[2][1] &amp;&amp; cards[2][1] == cards[3][1] &amp;&amp; cards[3][1] == cards[4][1])rank = 5;



I had to scroll all the way to the right to see that it does indeed perform an action.  While it's okay to have if statements on a single line, doing so with a long line is a bad idea.  In this case, put the rank = 5; on a separate line with curly braces, just like with your other code.
This is also hard to read:


if(vals[0] == vals[1]+1 &amp;&amp; vals[1] == vals[2]+1 &amp;&amp; vals[2] == vals[3]+1 &amp;&amp; vals[3] == vals[4]+1)



With this many conditions, you should at least list them vertically in some way so that each one is clearly visible.

(This advice also applies to the previous bulletpoint.)

Moreover, do keep in mind that long vertical sections aren't as bad as long horizontal sections.  If, say, someone were to read this on a terminal with line-wrapping, then your code's readability for them would decrease even more.