C++ Textfile data read by one digit integers

I tried to convert text file including no spaced binary data file like "0101010..." in to spaced binary data like "0 1 0 1 0 1..."
Please check my code and give me feedbacks. I appreciate it

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 MatDoub Data(N,items);

	ifstream data_file;
	data_file.open (input.c_str(), ios::binary);
	for (int p=0; p<N; p++){
		for(int i=0; i<items; i++){
				data_file >> Data[p][i];
			}
		cout<<endl;
	}
	data_file.close();


	ofstream exfile;
	exfile.open(output.c_str());
	for (int p=0; p<N; p++){
		for(int i=0; i<items; i++){
			exfile << Data[p][i]<<" ";
		}
			exfile <<endl;
	}
	exfile.close();
	return 0;
Topic archived. No new replies allowed.