Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Character to String Conversion in C++

#include <iostream.h>
#include <string.h>


void main()
{
    int n,i;
    char cc[20];
    cout << "\nenter no of characters";
    cin >> n;
    cout << "\nenter characters one by one";
    for(i=0;i<n;i++)
        cin >> cc[i];
    string c=new string(cc);
    cout << "\nthe created string from character goup is" << c;
}