关于读Shp文件的一个函数
看到一个SHP文件的类里有这样一个函数:
static void SwapWord( int length, void * wordP )
{
int i;
uchar temp;
for( i=0; i < length/2; i++ )
{
temp = ((uchar *) wordP)[i];
((uchar *)wordP)[i] = ((uchar *) wordP)[length-i-1];
((uchar *) wordP)[length-i-1] = temp;
}
}
从shp文件读入的数据是170328064,也就是iTemp = 170328064;
经过 SwapWord(sizeof(int),&iTemp);后
iTemp就变为9994请问这起到一个什么样的作用。
在文件头有这样一句
/* Establish the byte order on this machine.
请问大师什么意思