what is the data type for taking inputs of words or sentences?
or can i use char data type like
Code:char a[20];
This is a discussion on confusion on use of datatypes! within the C++ Programming forums, part of the General Programming Boards category; what is the data type for taking inputs of words or sentences? or can i use char data type like ...
what is the data type for taking inputs of words or sentences?
or can i use char data type like
Code:char a[20];
Yes, you can use a char array, but in C++ it's better to use the std::string class.