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.
我想逐字阅读标准输入(即输入字符串始终是用空格分隔的单词的集合)。现在我正在使用该read函数,并按字符读取输入字符。
read
是否可以?谢谢!
使用 readln (readline),您可以阅读整行,然后将其拆分为单独的单词。没有从文件中读取单词的功能。