Input structure elements

Hello! Is it possible to input elements of the structure, like by cin, ..if I define a structure and then want the elements to be cinned in there ..

Many thanks!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  ...

struct person{
char name[20];
char surname[20];
int age;
};

int main(){

person brother={...


return 0;
}

Just googleing, cant find anythig usable...
MANY THANKS!!!
and I want to input data from keyboard, different for each run/user.
You mean like this example:
http://www.cplusplus.com/forum/beginner/119280/#msg649586

Just change the input file fin to standard input cin.
Topic archived. No new replies allowed.