New course! Every coder should learn Generative AI!
Try a free lesson+ 1
How to use cin and string together?
2 Answers
+ 5
1)getline (cin,a); //line
2)cin>>a; //single word
+ 4
3) cin.getline(str_name,no_of_chars);
If you have a c-string...
//Null Terminated Array of Characters...