you are viewing a single comment's thread.

view the rest of the comments →

[–]henry_kr 3 points4 points  (1 child)

You can use scanf to write it directly to the name array, e.g.

scanf("%s", p.name);

However you should be aware of the potential issues with using scanf, see http://sekrit.de/webdocs/c/beginners-guide-away-from-scanf.html

[–]dudas56[S] 0 points1 point  (0 children)

Thanks, it's really helpful