Friday, 30 January 2015

Array of Char to String Conversion in C++

Structure of the Problem Requirements

  This Program convert an array of char into string in C++ program. The most simple way to convert an array of char into String is that just assign the value of array to string and it will be converted into string.

Source Code

#include<iostream>
using namespace std;
int main ()
{
cout<<"\t \t \t LEP Tutorials \n \n \n ";
char LEP [200] = " This is Array of Char \n ";
string s ;
s = LEP;
cout<<s<<endl;
}

Output of the Program

Array of Char to String Conversion in C++

Share it Please
asad

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.

0 comments:

Post a Comment