need urgent help with file outputs

I am trying to read in information from a file to a different file. The file just contains numbers. the first number is just an single integer and it tells how many lines there will be. the output file looks like it has stuff in it but it is blank. I think it might be a problem with my outputfile.

3
35.9 147.74 -24.15 -5.62 -25.67 42.22
-36.32 70.53 49.71 121.29 96.63 94.97
-9.95 -29.67 -49.14 55.2 10.31 82.2








#include <iostream>
#include <fstream>
using namespace std;

int main()
{
const int list = 6;
int numbers [list];
int lines = 3;


ifstream inputfile;
ofstream outputfile;

inputfile.open("C:\\Users\\Nick\\Desktop\\Project2data\\proj2data.txt");

outputfile.open("C:\\Users\Nick\\Desktop\\ProjectData\\Project.txt");


inputfile >> lines;
outputfile << lines;


/*for (int count = 0; count < list; count++)
{
inputfile >> numbers[count];
}*/






return 0;
}







If you could also give me some advice on how to write the rest of the code I would appreciate it. thank you
Last edited on
Topic archived. No new replies allowed.