Associate
- Joined
- 21 May 2003
- Posts
- 1,008
Hi. I need to work out how to write the following in java:
so far I have:
but when i try and access something (i.e t.input_data.time), i get an error NullPointerException.
anyone have any ideas?
Code:
struct times {
int time ;
char c ;
} input_data[ NINPUT_DATA ] ;
so far I have:
Code:
public class times{
int time;
char c;
} ;
public times[] input_data = new times[NINPUT_DATA];
but when i try and access something (i.e t.input_data.time), i get an error NullPointerException.
anyone have any ideas?