ここで問題が発生し、苦労しています。だから、私はフォーマットで何かを読む必要があります[私の問題をもう少しよく理解するために、本文も読んでください]:
TITLE
The text is actually from a file being redirected
to input stream via piping in linux bash. I cannot
use ifstream or anything other than some form of cin,
of which I believe getline to be the most useful.
etc.
特に苦労しているのは、TITLEと本文の間の余白です。getline(cin,string) を使用してそれを回避する方法が思いつかないようです。
私が思いついた最高のもの:
while(inputString.size() != 0)
getline(cin,inputString);
//process string
... 上記の空白行でウィンドウから放り出されます。
アイデアはありますか?
ありがとう!