|
Java and C++ are examples of typed languages. In a typed language, every value has a type. In C++, an integer has type int and a real number has type double. (Type name double is awful, but we are stuck with it.)
In C++:
A string has type char*. (The asterisk is part of the type name.) That will only make sense later on, but notice that 'a' has type char and "a" has type char*. Strings and characters are different types of things.
See more detail on numeric types, values and constants in C++.
|