ILE C/C++ Programmer's Guide


Declaring unsigned char Pointers as unsigned char Variables


C++ language only
QXX functions return unsigned char pointers. ILE C allows you to assign a signed char to an unsigned char pointer. This is not valid in C++.

unsigned char pointers must be declared as unsigned char variables in the source code as shown in the following figure:

Figure 231. Code that Declares an unsigned char Pointer as an unsigned char Variable


#include <xxcvt.h> //void(QXXITOP(unsigned char *pptr, int digits, int
                   //fraction, int value);
 
#include <stdio.h>
 
  int main(void)
    {
     unsigned char pptr[10];
     int digits = 3, fraction = 0;
     int value = 116;
     QXXITOP (pptr, digits, fraction, value);
     }


[ Top of Page | Previous Page | Next Page | Table of Contents ]