Home > Mobile >  Qt after memory mapping, how to read maps in memory of the file??
Qt after memory mapping, how to read maps in memory of the file??

Time:12-05

Qt after memory mapping, how to read maps in memory of the file?
QFile file (" 11. TXT ");
Double a1, a2, a3, a4.
if(! File. The open (QIODevice: : ReadOnly))
{
Cout<& lt;" Open the Error "& lt; return 0;
}
QTime time;
Time. The start ();
Uchar * FPTR=file. Map (0, the file. The size ());
//how to extract the data extracted from FPTR next
??????????????????????????????????????????????????

CodePudding user response:

Pointer offset, can operate
* FPTR=1;
* (FPTR + I)=0;

CodePudding user response:

Principle is to address + shift to obtain the corresponding data, many methods, such as memory copy memcpy after get the data into the corresponding data type
  •  Tags:  
  • Qt
  • Related