Here is the culprit. MSVC++ doesn't seem to like dereferencing a string iterator