mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Update 20220510 How to (safely) read user input with the getline function.md
修改格式
This commit is contained in:
parent
f4d3f074d2
commit
97ee76a6bb
@ -26,10 +26,9 @@ As a simple example, we might ask the user a question and read the result into a
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main()
|
||||
int main()
|
||||
{
|
||||
char city[10]; // Such as "Chicago"
|
||||
char city[10]; // Such as "Chicago"
|
||||
|
||||
// this is bad .. please don't use gets
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user