博文背景 一直想像cat >> hello.txt或者cat >> hello.txt <<- 'EOF'这个样子以EOF为结束符读取多行文本,搜了一些函数感觉都是曲线救国,不如自己从最基础的东西开始自己造。 具体操作 #include <iostream> using namespace std; int main() { char buff[1000]; in