Originally Posted by Daved
You can use the code provided to read in the string, but it won't work for your sample in the first post because it only reads in a single word. To fix this, learn how to use getline with the string class to get the entire line.
The next problem is the algorithm you need to use to find out whether the string is correct or not. You don't want to compare the entire string. What you want to do first is make sure the string has at least two characters (otherwise it can't be "//"). Then check the first character of the string. If it is a '/', then check the second character of the string. If it is not a '/', then you display the error message. Try to convert that into code.