#include<iostream>
#include <string>
using namespace std;
int main(){
string str("hello world");
const char * cstr = new char [str.length()+1];
cstr=str.c_str();
int i=0;
for(i=0;cstr[i]!='\0';i++)
cout <<cstr[i];
cout <<endl;
system("pause");
return 0;
}
#include <string>
using namespace std;
int main(){
string str("hello world");
const char * cstr = new char [str.length()+1];
cstr=str.c_str();
int i=0;
for(i=0;cstr[i]!='\0';i++)
cout <<cstr[i];
cout <<endl;
system("pause");
return 0;
}