Slide Example Feedback

Just a minor thing here, and technically nothing is wrong. Gavin introduces escape characters and gives an example of how using " in the string will end the string early, saying we might try it this way:

std::cout << "He said: "Hello World!";

My first reaction was that this wouldn’t work because there is no ending ". We have one to start the string, and two that encapsulate Hello World!, but none to end the string. A better example may be:

std::cout << "He said: "Hello World!"";

Of course this still will not work, but it’s closer to what I originally thought would work.

Privacy & Terms