Newbie: Can not convert for char to unsigned char 
Author Message
 Newbie: Can not convert for char to unsigned char

Hi

I am sure this is very simple to most of you. If I copy and paste any of the
sql examples into c++ 5.0 I get the error 'unable to convert parameter 2
form char[6] to unsigned char' Assuming the code is correct, all the
examples can't be wrong, can they, what compiler option is set incorrectly?
If possible keep the answer simple as this is very new to me. The example is
from the SDK,  "how to get process results (ODBC)".



Fri, 01 Mar 2002 03:00:00 GMT  
 Newbie: Can not convert for char to unsigned char
    In C++, "char", "signed char" and "unsigned char" are three distinct
types.  And, while there are standard converisons between them, there are
not standard conversions between pointer to them.   (just like there is a
conversion from int to long, but none for int* to long*)

    I assume you have something like:

    char    buff[6];
    SomeFunc(parm1, buff);

    make the first line
    unsigned char buff[6];


Quote:
> Hi

> I am sure this is very simple to most of you. If I copy and paste any of
the
> sql examples into c++ 5.0 I get the error 'unable to convert parameter 2
> form char[6] to unsigned char' Assuming the code is correct, all the
> examples can't be wrong, can they, what compiler option is set
incorrectly?
> If possible keep the answer simple as this is very new to me. The example
is
> from the SDK,  "how to get process results (ODBC)".



Fri, 01 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Converting unsigned char to signed char invokes UB?

2. converting const char* to unsigned char[1024]

3. Convert from char to unsigned char

4. Convert from char to unsigned char

5. Q: How can i convert a char* to unsigned char*

6. NewBie: difference between char* and unsigned char*

7. Sorting a Huge Unicode File use strcmp(unsigned char *, unsigned char *)

8. char, unsigned char, signed char

9. Sorting a Huge Unicode File use strcmp(unsigned char *, unsigned char *)

10. Sorting a Huge Unicode File use strcmp(unsigned char *, unsigned char *)

11. How to convert unsigned long to unsigned char?

12. To convert unsigned char to unsigned short in VC++

 

 
Powered by phpBB® Forum Software