array of string input problem

#include<iostream>
#include<string>
using namespace std;
int main(){
string array[5];
int i=0,j=0;
string z[5]={"abdgh","ygurjc","guqhkcn","asdfh","sent"};
for(i=0;i<5;i++)
for(j=0;j<4;j++)
{
array[i][j]=z[i][j];
cout<<"\narr[][]="<<array[i][j];
}
for(i=0;i<5;i++)
cout<<"\narr="<<array[i]<<"=1"<<endl; //except this all lines r work
//ing...no any error...but
//this line z showing no any o/p. plzzz help to resolve this
//problem. how can i get the desired string into an array of string.
getch();
return 0;

}
Topic archived. No new replies allowed.