+ 1
Please how string data type is declared in c++
Data type
1 Réponse
+ 5
In order to use the string data type, the C++ string header <string> must be included at
the top of the program. Also, you’ll need to include using namespace std; to make
the short name string visible instead of requiring the cumbersome std::string. (As a
side note, std is a C++ namespace for many pieces of functionality that are provided in
standard C++ libraries. For the purposes of this class, you won't need to otherwise know
about namespaces.) Thus, you would have the following #include's in your program in
order to use the string type.
#include <string>
using namespace std;