作者ricky155030 (HighPoint( ̄□ ̄|||)a)
看板C_and_CPP
标题[问题] 字串输入
时间Sun Apr 26 10:18:40 2009
在C++中
我想输入一行字串
但是其中有空格
ex:hello C++ 这样
但是compiler会以为我是输入两行字串
hello和C++
那我要怎麽输入一行字串使得其中能够包含空格呢??
请教各位版友了
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.116.132.135
1F:推 ianfang:getline 04/26 10:45
2F:→ johnhmj:吸语言:gets function 04/26 17:11
3F:推 Yshuan:第5行有误 关compiler什麽事情... 是你的code阿... 04/26 21:21