There are low-level strings ("C strings") which do not have the high-level behaviors you have probably come to expect from other languages. When you type in a string literal (in "quotes") you are creating one of those types of strings:
http://en.wikipedia.org/wiki/C_string_handling
In C++, one of the first things people do is pass that low-level string to the constructor of std::string
to create an instance of a class that has more of the conveniences in interface that you would be used to.
http://www.cplusplus.com/reference/string/string/
Because C++ is layered over a very C-like foundation, it's valuable to understand how C-style strings work. At the same time, a professional/idiomatic C++ program should not use functions like strcmp
. For an interesting study into the differences between C style programming and C++ style programming, check this out:
Learning Standard C++ As A New Language (PDF) by Bjarne