char ch;
int countbyte = 0;
while ((ch = fgetc(fp)) != -1)
{
if (countbyte % 8 == 0 && countbyte!=0)
{
countbyte = 0;
std::cout << str;
memcpy(&id, str, N);
msg->push_back(id);
for (int i = 0; i<N; i++)
str[i] = '\0';
}
str[countbyte] = ch;
countbyte++;
}
memcpy(&id, str, N);
msg->push_back(id);