
-----------------------------------
Justin_
Fri Aug 18, 2006 7:27 pm

Vectors + Arrays
-----------------------------------
Let's open a discussion on how Vectors jibe with arrays. 

Whilst making my file binder I noticed that if I put an array into the vector it scrambles the first 8 bytes of the DOS stub.  This is not a huge problem since a PE executable doesn't require the first 8 bytes, but I still require an explanation.  I doubt anyone here knows but:   

Here's an example:


#include 
#include 
#include "file.h"

using std::cout;
using std::endl;

int main()
{
   File file("gen.exe");
   unsigned char* pFile = file.getData();
   cout 