Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Meet and Greet (http://www.go4expert.com/community/meet-and-greet/)
-   -   array of strings input problem (http://www.go4expert.com/community/array-strings-input-t28685/)

rdx 7Jul2012 23:48

array of strings input problem
 
Code:

#include<iostream>
#include<string>
#include<conio.h>
using namespace std;
int main(){
        string array[5][5];
        int i=0,j=0;
        string z[5]={"abdg","ygur","guqh","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;                //this z not workin. THERE IS NO ANY O/P. PLZZ HELP ME TO RESOLVE THIS PROBLEM!                       
                                               
  getch();
  return 0;
       
        }



All times are GMT +5.5. The time now is 03:51.