stl_a1.cpp

来自「构造函数例子」· C++ 代码 · 共 24 行

CPP
24
字号
// STL_A1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <vector>
#include <algorithm>
#include <iterator>
#include <iostream>
#include <fstream>
using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
	 if(argc>2)
        ofstream(argv[2], ios::out|ios::binary)<<ifstream(argv[1], ios::in |ios::binary).rdbuf();
    else if(argc>1)
        cout<<ifstream(argv[1], ios::in |ios::binary).rdbuf();
    else
        cout<<cin.rdbuf();
	return 0;
}

⌨️ 快捷键说明

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