[Login|Register]
New post

Show post

Search forum

Read topic
怎么结束输入 2018-01-19 10:45:34 momo
我用getline(cin,s,';')这样可以以;结尾,但是如果输入字符中有;那就不对了,所以怎么结束输入
Re:怎么结束输入 2018-03-12 23:17:10 kimke
用while ((c = getchar() == -1)来判断结束
Reply
Title
Message
(64K)
University of Science and Technology of China
Online Judge for ACM/ICPC
Processed in 1.4ms with 1 query(s).