[OSRS-PROJ] pj_gridinfo.c file and C++ compilation

Paul Selormey paul at toolscenter.org
Wed Aug 20 02:58:02 EDT 2003


In the function
static int pj_gridinfo_init_ntv2( FILE *fid, PJ_GRIDINFO *gilist )
{
    unsigned char header[11*16];
}

the "header" variable as defined will pass through most C/C++ string
functions
like "strncmp".

VC++ 6.x gives the following error:

-------------------------------------------------------------------------
C:\...\pj_gridinfo.cpp(372) : error C2664: 'strncmp' : cannot convert
parameter 1 from
'unsigned char [176]' to 'const char *'
        Types pointed to are unrelated; conversion requires
reinterpret_cast,
C-style cast or function-style cast
-------------------------------------------------------------------------

Since I do not know the format of the NTV2 file, I cannot tell if the
"unsigned char"
is necessary. Any suggestions for work around? Will the cast to "const
char*" be safe?

Best regards,
Paul.

----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.



More information about the Proj mailing list