0
What is the command to declare a string data by human like cin>>a; but when a is a string?
4 Respostas
+ 2
Just use
getline(cin, a);
0
I think...
While declaring we have to give
String a; //string is a built data type
And now we can get the string from user as human in runtime
0
hello @balaji. string is not a default data type. you have to declare a character array and use gets () under the string.h directory or stdio.h or stdlib.h I don't remember which one it is.
0
u are correct @shubhranil but string is a built in data type that can be also accessed by giving "string a("characters")"