Effective way to find two string are anagrams
anagram seems like a misnomer. A better name for such function would be is_anagram.
I don't see why &lt;set&gt; is included.
Fail early:

if (usr1.length() != usr2.length()) {
    return false;
}


spares you a level of indentation.
Test for pos==usr1.size()-1 is waste of time, because it fails at every iteration except the last one, and still tests for characters at pos.
Sorting inputs is an essential part of the algorithm, and hence shall be performed inside anagram. As written, anagram only tests two string for being identical.
On the other hand, removing spaces does not belong to the core algorithm, and you correctly let the caller do it. You may also want to  remove punctuation, and maybe convert the strings to the lower case. This logic indeed belongs to a caller.
Since you already #include &lt;algorithm&gt;, an std::equal(usr1.begin(), usr1.end(), usr2.begin()) looks more C++ish (if you are open to C++14, a variant std::equal(usr1.begin(), usr1.end(), usr2.begin(), usr2.end()) even spares the test for equal length).


All that said,

    bool is_anagram(std::string s1, std::string s2)
    {
        std::sort(s1.begin(), s1.end());
        std::sort(s2.begin(), s2.end());
        return std::equal(s1.begin(), s1.end(), s2.begin(), s2.end());
    }


As mentioned in comments, an alternative implementation using histograms is very appealing.