How to (safely) read user input with the getline function

Posted by Scott_Ruecker on May 10, 2022 7:37 PM EDT
Opensource.com; By Jim Hall
Mail this story
Print this story

Reading strings in C used to be a very dangerous thing to do. When reading input from the user, programmers might be tempted to use the gets function from the C Standard Library. The usage for gets is simple enough:

Full Story

  Nav
» Read more about: Story Type: News Story; Groups: Red Hat

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.