enter array element until pressing enter

Pages: 12
gets_s() is optional; a conforming implementation need not have it.
http://en.cppreference.com/w/c/io/gets

fgets() is guaranteed to be available.
http://en.cppreference.com/w/c/io/fgets

Reading into a string first is both messy (if we want to handle overflow) and unnecessary.
See: http://www.cplusplus.com/forum/general/159801/#msg815687
Topic archived. No new replies allowed.
Pages: 12