Conversion Error

Conversion Error

Post by Aaron S. Bieberit » Thu, 14 Jun 2001 22:40:13



I'm using CW 7 and C++ and I keep getting the following error:

illegal implicit conversion from 'void *' to 'const ListType *'

Here's my line of code:

 UInt8  sortOrder;
 sortOrder = LstGetSelection(GetObjectPtr (ListPreferencesSortOrderList));

I tried casting it to a ListPtr, ControlPtr, and UInt8 but none of that
seemed to work cause I still got the same error.  What do I have to do to
correct this?

Thanks,
Aaron

 
 
 

Conversion Error

Post by Aaron S. Bieberit » Fri, 15 Jun 2001 02:58:05


I'm using CW 7 and C++ and I keep getting the following error:

illegal implicit conversion from 'void *' to 'const ListType *'

Here's my line of code:

 UInt8  sortOrder;
 sortOrder = LstGetSelection(GetObjectPtr (ListPreferencesSortOrderList));

I tried casting it to a ListPtr, ControlPtr, and UInt8 but none of that
seemed to work cause I still got the same error.  What do I have to do to
correct this?

Thanks,
Aaron

 
 
 

Conversion Error

Post by Steve Palme » Fri, 15 Jun 2001 06:01:00


hi Aaron,

how is your 'GetObjectPtr' method/macro defined?

steve

 
 
 

Conversion Error

Post by MWRo » Fri, 15 Jun 2001 06:30:32




Quote:>I'm using CW 7 and C++ and I keep getting the following error:

>illegal implicit conversion from 'void *' to 'const ListType *'

>Here's my line of code:

> UInt8  sortOrder;
> sortOrder = LstGetSelection(GetObjectPtr (ListPreferencesSortOrderList));

>I tried casting it to a ListPtr, ControlPtr, and UInt8 but none of that
>seemed to work cause I still got the same error.  What do I have to do to
>correct this?

cast your void pointer to a const ListType  pointer.   We have tightened
up (the standard has tightened up) these conversions for const.

Ron

--
Metrowerks announces host of new Wireless Java tools at JavaOne

Java Support Newsgroups: codewarrior.java, codewarrior.java.embedded


 
 
 

1. Error # 2159 Visio 2000 to Visio 5 conversion error

I am trying to convert a Visio 2000 Pro document to Visio 5.0.  When
converting  I receive the following error:

Visio internal erro: #2159
Action 1005: Save As

First try closing and reopening the file.  Next try restarting Visio.

I have opened and closed the document and Visio several times.  Does anyone
know the cause or resolution for this error.

Thanks.

Jim York
Baker Robbins & Company

2. Need your opinion

3. Microsoft Project to PDF - Conversion Errors

4. printer

5. Examples of numeric/character conversion errors requested

6. Industrial Designer Needed

7. Floating point conversion errors within wcc ?

8. DISA lame delegation report

9. Numerical Conversion Error - 51422

10. Conversion Error?

11. trapping type conversion errors

12. Catching type conversion errors

13. SPSS file conversion error