problem in use of array of strings...

#include<iostream>
#include<string>
using namespace std;
int main(){
string array[5];
int i=0,j=0;
string z[5]={"abdg","ygur","guqf","asdf","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]<<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.

return 0;

}
Topic archived. No new replies allowed.