I'm writing a vector array to an ofstream file, however certain values aren't getting written, I.E.:

```
#include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
int main (){
    char * hold = new char [100];
    vector<double> fx(2049);
    ifstream inputFile;
    ofstream myFile;
    inputFile.open("data.txt");
    myFile.open("test.txt");
    for (int c=0; c<2049; c++){
         inputFile.getline(hold, 100);
         fx[c] = atof(hold);
    }
    for (int c=0; c<2049; c++){
         myFile << fx[c] << "\n";
    }
}

```

Within fx, the second half is all equal to 0. (fx[1024] through fx[2048]==0). Within test.txt however, none of these 0 values are present, on the carriage return is applied. Any thoughts? 
Thanks! (New to the formatting of these questions... any tips to make this more understandable would be appreciated.)

Note: I realize this program is rather redundant. The actual program has a great deal more functionality to it, this is just an area that is working incorrectly.