String..

char a[20][20];
static int i=0;
cout<<"Enter the name:";
cin.get(name[i],20);
i++;


Can any one tell me that whats wrong with this code..actually i want to store 20 names in it..
For one thing, your array is called a, but you're doing a cin.get to to a variable called name which is not defined.
Topic archived. No new replies allowed.