[ create a new paste ] login | about

Link: http://codepad.org/C8t9k4fD    [ raw code | fork ]

C++, pasted on Mar 19:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc,char *argv[]){
	char buff[8];
	if(argc!=2)
		return 1;
	ifstream fin(argv[1]);
	if(!fin.is_open()){
		cout<<"ファイル:"<<argv[1]<<" が開けません"<<endl;
		return 1;
	}
	while(!fin.eof()){
		fin.getline(buff,8);
		cout<<buff;
	}
	fin.close();
	return 0;
}


Create a new paste based on this one


Comments: