Wait, what? While this is great pragmatic advice, it's not very good for a newbie. A newer programmer should absolutely be able to go to of all things the documentation to get some kind of an understanding of what's going on. These kinds of "quick reference" techniques are great once you know the language and need information quick, but it's just proof that the docs are unapproachable to a new programmer if they have to resort to non-standard operations like the above to figure out what's going on.
They can do that. It's plain on any good documentation site (e.g. http://en.cppreference.com/w/cpp/string/basic_string) that `string::size_type` is unsigned. The teachers just have to be knowledgeable enough to let students know of good documentation (if, by documentation, you mean what I take you to mean, which is stuff other than the standard itself, which is nearly unintelligible for new people). The technique I gave was just for fun.