Question: I am saving 100,000 integers to a binary file using:

```
    for(unsigned int i = 0; i < 100000; i++){
        temp = generateRand(99999);
        file.write(reinterpret_cast<const char*>(&temp),sizeof(temp));
    }

```

and from this file, I'm trying to read integers, and save them into a vector.

```
ifstream ifile;
ifile.open("test.bin",ios::binary);

ifile.seekg(0, ifile.end);
long size = ifile.tellg();
ifile.seekg(0, ifile.beg);

int restore = 0;
int count = 0;

while(ifile.tellg() < size){
    ifile.read(reinterpret_cast<char*>(&restore), sizeof(restore));
    v.push_back(restore);
    count++;
}

```

However it seems like I can only read 99328 integers, not 100000. I am relatively new with read/write with binary files, so can you guys help me?

Answer: 
You shouldn't have more than one element with the same ID. Try to switch all IDs in the snippets you shared to classes and see if it works. Having multiple elements with the same ID results in unpredictable behaviour from the browser, so your styles may or may not be applied.
Okay so I found the problem. Like I suspected from the start it was something very simple. The code was correct, but I took Alexanders advice and decided to echo out the div for each letter instead of having it directly in the HTML which also gives a better structure. The problem itself was the website cache, since I run the website locally (I maybe should have mentioned it in the OP) the cache would override the new file and keep the old settings. Running it in incognito solved it and everything works as intended now.