Link to home
Start Free TrialLog in
Avatar of Reeds
Reeds

asked on

How to convert BYTE to CString?

This is what I am trying to do:

struct fileData
{
      CString empNo[10];
      CString empName[27];
};

extern fileData *      m_fileData;
BYTE buffer[44];
DWORD dwRead;
do
      {
            i = 0;
            dwRead = myFile.Read(buffer, 44);
            m_fileData[i].empNo = buffer[10]; // This doesn't work, since assigning to a CSTring
            i++;
      }
      while (dwRead > 0);

How do I assign the byte values to my string? Any help would would be appreciated

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial