![Data Type string #include // C++ String class string str1, str2; // Default constructor cin >> str1 >> str2; cout << “str1: ” << str1 << endl << “str2: - ppt download Data Type string #include // C++ String class string str1, str2; // Default constructor cin >> str1 >> str2; cout << “str1: ” << str1 << endl << “str2: - ppt download](https://slideplayer.com/7244684/24/images/slide_1.jpg)
Data Type string #include // C++ String class string str1, str2; // Default constructor cin >> str1 >> str2; cout << “str1: ” << str1 << endl << “str2: - ppt download
String a='rajendra Prasad'; String b='Jawaharlal Nehru'; String correct; Cin>>correct; If (a==correct) {Cout<<'correct answer'<<endl;} Else {cout<<'wrong answer'<<endl;}. Why it only displays wrong answer even if I input a? - Quora
![How to use cin.get(), cin.peek() and cin.putback() in c++ programming. What is difference between cin amd cin.get() c++. | Medium How to use cin.get(), cin.peek() and cin.putback() in c++ programming. What is difference between cin amd cin.get() c++. | Medium](https://miro.medium.com/v2/resize:fit:1400/1*jNx7vDoZeDvD12QVfEiuVA.png)
How to use cin.get(), cin.peek() and cin.putback() in c++ programming. What is difference between cin amd cin.get() c++. | Medium
![consider the following code:ofstream fout;string str;cin>>str;fout.open(str);if the user enters the - brainly.com consider the following code:ofstream fout;string str;cin>>str;fout.open(str);if the user enters the - brainly.com](https://us-static.z-dn.net/files/dc9/95dc3481208119f35619c22d7bea23af.png)
consider the following code:ofstream fout;string str;cin>>str;fout.open(str);if the user enters the - brainly.com
![c++ - getline(cin, input) trying to store more than one word in a string. getline(cin, input) does not work in this situation - Stack Overflow c++ - getline(cin, input) trying to store more than one word in a string. getline(cin, input) does not work in this situation - Stack Overflow](https://i.stack.imgur.com/KzWns.png)