ch01.1.5.c

来自「c++ primer源代码 第一章chap01」· C语言 代码 · 共 31 行

C
31
字号
// #include <iostream>

#include <iostream.h>
#include <string>

/**
 **
 a.out < input_file
 word read is: Shyly,
 word read is: she
 word read is: asks,
 word read is: "I
 word read is: mean,
 word read is: Daddy,
 word read is: is
 word read is: there?"
 ok: no more words to read: bye!
 **
 **/

int main()
{
 	string word;

 	while ( cin >> word )
       		cout << "word read is: " << word << '\n';

 	cout << "ok: no more words to read: bye!\n";
 	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?