i want to store a string entered by the user including the space characters into the following array
char array[100];
how can i do it.
i want to store a string entered by the user including the space characters into the following array
char array[100];
how can i do it.
You can use the following to get the user-entered string to a string object, then convert it to whatever you need:
string c;
getline(cin, c);
Documentation for getline can be found here: http://cplusplus.com/reference/iostream/istream/getline/