1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

array of strings input problem

Discussion in 'Meet and Greet' started by rdx, Jul 7, 2012.

  1. rdx

    rdx New Member

    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;
    	
    	}					 
    
     

Share This Page