Find Longest Consecutive Substring In Cpp