Not able to input strings using getline() .It is reading only one string

Viewed 546
char* name[4];
int j=0;
while(cin.getline(name[j],80))//input given:you(ent)me(ent)he(ent)she
    cout<<name[j++];

this code is reading only one string upto one newline.should'nt it read all 4 strings and print them ?and is this a good way to input string using getline?

3 Answers
Related