AnsweredAssumed Answered

CW4.1.6 for Hitachi SuperH - C++ Help

Question asked by ESQUIROL Claude on Mar 20, 2007
Latest reply on Mar 21, 2007 by CompilerGuru

I am using Codewarrior for Hitachi SuperH ver 4.1.6 build 0672.

I know it is an old version but i write software for casio machines and this is the one they use .

I face a problem with C++ syntax:
I do use delphi to write my software and i wrote a converter to convert pascal to C , everything works fine since years.
I face a problem with class method pointers , in delphi we can have variable which are class method pointers declared as " TOnClick = Procedure (Sender:TQtControl) of object;"
i translate this to :
typedef void (_tobject::*uonclick)(tqtcontrol *sender);
typedef struct {
_tobject *obj;
uonclick event;

I do have declared class variable of that type
tonclick fonclick;

I do initialize the variable with

This declaration works fine with Visual C++ 6.0 but when i compile it with code warrior i get :
Warning : illegal implicit member pointer conversion
_qtcore.CPP line 1602 b->fonclick.event=(uonclick)onlevelclick;

Alban Edit: Mention product name in subject line.

Message Edited by Alban on 2007-03-20 05:48 PM