ya! the code below is from the section where i am reading the binary file and displaying it in the table cell.
but i am able to see only the last msg.
///////////////////////
unsigned int uiData;
QString szTmp;
fp = fopen("test.bin","r+b"); //test.bin is the binary file containing data in the form of structure MNTPACK
fseek( fp, 0L, SEEK_SET);
while(1)
{
fread(pMtStruct,sizeof(MNTPACK), 1, fp); //pMtStruct is a pointer to MNTPACK struct
if(!feof(fp))
{
uiData=pMtStruct->DataPack; //DataPack is an unsigned integer Value
szTmp = szTmp.setNum(uiData,16);
table1->setText(1,1,szTmp);
table1->updateCell(1,1);
}
else
{
break;
}
}
Bookmarks