Please use code tags in your posts (# in the format area to the right of where you type your posts); it makes the code easier to read.
Your problem with read is that vector does not work like that. Looking at the references firedraco provided, you can see that the first parameter needs to be of type char* and vector::begin() returns an iterator to the beginning of the vector. You will probably have to use a loop to get data into a temporary variable first then transfer it to the vector until you are finished reading the file.
Also, whenever you call open(), you should check to ensure it succeeded and close the file when you are finished. In addition, cin does not work with strings. Instead, use getline(cin, file);
Its been a couple days but I thought id post that i solved my problem myself, x.read (&vector1.begin(), size); simply needed to be changed to x.read (&(vector1[0]), size);. Thanks for the input anyway Duaos