#include<iostream> #include<string> #include<fstream> using namespace std; int main() { #ifndef ONLINE_JUDGE ifstream in("in.txt",ios::in); streambuf *backup,*file; backup=cin.rdbuf(); file=in.rdbuf(); cin.rdbuf(file); #endif string s; while(cin>>s) cout<<s<<endl; #ifndef ONLINE_JUDGE cin.rdbuf(backup); in.close(); #endif ; }
相关文章
- 为什么一定要调用 setlocale 呢? 因为在 C/C++ 语言标准中定义了其运行时的字符集环境为 "C" ,也就是 ASCII 字符集的一个子集。使用setlocal改变整个应用程序的字符集编码方式(wcstombs使用前要设置 setlocale (LC_ALL, "chs"); )
- C++ 读取配置文件结束指定进程
- C++ assert断言
- [C++] MyList
- C++模式学习------单例模式
- jq 修改input 标签的值
- 图像处理之PCA(C++)
- 让input支持 ctrl v上传粘贴图片? 让input支持QQ截图或剪切板中的图像数据(Java实现保存)
- error: Microsoft Visual C++ 14.0 is required(line_profiler模块安装失败的解决办法)
- C++出现计算机术语5