For string data type, it is very important to use header file which is string.
#include <string>
Code:
#include <iostream>
#include <string>
using namespace std;
int main{
string s1;
cout<<"Enter your name : ";
cin>>s1;
}
AUTHOR: Muhammad Abbas
I am Software Engineer.
0 Comments