the while loop terminates the first time it reaches line 63. Because you are checking whether s is nullptr or not. Line 65 looks better.
But you also check the second character all the time (line 30, s[1]).
My prompt opens up but when I push enter to execute the program. I get an error message that says "PROG11.exe has stopping working" like it just crashes.
Also I haven't learned std::string or "auto". I do appreciate the response though.
I am not sure why while (s[i] != 0); makes my program crash.
You do not increase i in the while loop. So line 65 will always check the i-th character. This results in an endless loop.
Also you did no initialise i in line 11. I am not sure whether it is automatically set to 0 or not in this context, but just to be sure you should set it to 0, like you do with the other variables.