My professor has written this code on the board and everyone was able to run it but me. When I use Visual Studio it gives me this error:
"Unhandled exception at 0x774E5B68 in Working with Strings.exe: Microsoft C++ exception: std::out_of_range at memory location 0x005FFA24."