How we can use string data type in c++ code


It is very important to know about string data type because in which i will input every thing like name , number , or key words etc. So string data type is very important for c++.
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;
}

Click Here For Watching Video Of This Program

avatar
AUTHOR: Muhammad Abbas
I am Software Engineer.

0 Comments