Hello !
On Thu, Dec 20, 2012 at 12:40 AM, Mehmet İpek wrote:
> In native c code you read unsigned long (4 byte in 32 bit platforms) and in
> Qt code you read quint64 (64 bit in all platforms).
Problem was here, thanks a lot.
--
Best regards,
Sincerely yours,
Yuriy Rusinov.
I saw several issues in your Qt code.
* In native c code you read unsigned long (4 byte in 32 bit platforms) and
in Qt code you read quint64 (64 bit in all platforms).
* You are reading with readLine which if it sees an end of line char, it
stops reading. So, this is simply wrong. You have to use
Hello, Syam !
wrote:
> On 12/19/2012 02:45 PM, Yuriy Rusinov wrote:
>> for (int i=1; i<=na; i++)
>> {
>> char * colData = new char [nd2*sizeof (unsigned long)];
>> qint64 colLength = fData->readLine (colData, nd2*sizeof
>> (unsigned long));
>
> Why would you use readLi
On 12/19/2012 02:45 PM, Yuriy Rusinov wrote:
> for (int i=1; i<=na; i++)
> {
> char * colData = new char [nd2*sizeof (unsigned long)];
> qint64 colLength = fData->readLine (colData, nd2*sizeof
> (unsigned long));
Why would you use readLine() for a binary file?
The conce
I have to read binary file via Qt. In console application I make
FILE * fid5 = fopen ("./test_data/source.rgg", "rb");
...
for (int i=1; i<=na; i++)
{
fread (st+i-1, sizeof (unsigned long), nd2, fid5);
...
}
and all work fine. In Qt application I try
QStr