typedef on Java?
I've to import some code from C to Java , so I've some trouble with the 'typedef' :
For Example :
typedef MY_TYPE T_INPUT [MAX_INPUT] ; //My Type Already declared as a struct
static T_INPUT t_input[MAX_INPUT][MAX_INPUT];
JAVA : Any Idea ?
(via C++ to Java Converter)
private static MY_TYPE t_input = new MY_TYPE[MAX_INPUT][MAX_INPUT][MAX_INPUT];
Last edited by David Anton; 05-25-2009 at 10:18 AM.
Reason: originally posted conversion was wrong
Thx ; )
For the typedef I just convert it into a class , I think it's the only way to make it as a Type in Java !!
S_INPUT_TYPE T_INPUT=new S_INPUT_TYPE[MAX] ;
T_INPUT [ ][ ]T_input_=new T_INPUT[MAX][MAX];
If you want it as a separate type, I guess thats the way. But beware, converting between T_INPUT and MY_TYPE may introduce problems. It may be better to use MY_TYPE directly wherever required.
Last Post: 09-19-2007, 05:58 AM
Last Post: 06-14-2006, 03:16 PM
Last Post: 05-13-2005, 06:46 AM
By JJ in forum Enterprise
Last Post: 07-06-2000, 04:50 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center