I have a file with a series of words beginning at offset 1440 and running for a variable number of bytes until the end of file. It does consist of exactly 18 words. Each of the words is in Unicode.

I have written an ifstream statement as follows where
nBytes =1440
l and m are long and I find the size of buffer required by going to end of file and subtracting 1440

Code:
ifstream filef((LPCTSTR) dlgFile.GetFileName(), ios::in|ios::binary|ios::ate);
filef.seekg (0, ios::end);
m = filef.tellg();
int catBytes = m-l;
filef.seekg (0, ios::beg);
filef.seekg (nBytes, ios::beg);
catbuffer = new char [catBytes];
filef.read (catbuffer, catBytes);
filef.close();
I have a struct defined as follows
Code:
 struct categories {
	             char category;
	             }catarray[18];
Question is how do I get the catbuffer into the catarray. If it helps the format of the unicode is B.r.o.w.n...G.r.e.e.n...O.r.a.n.g.e...
etc

Thanks for any guidance....Andrew
(C++ MFC App using FormView)