Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在遇到整数之前,如何读取 C 中的字符串?例如:1000 圆珠笔 12 15 24 我需要将“圆珠笔”与整数分开。它是如何完成的?
我这样做的方式可能是用来fgets获取整行,然后手动解析它,如下所示:
fgets
strtoul
isdigit