LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Pointer error message with array type pointer

Hi
 
I keep on getting an error messge ''Pointer arithmetic involving null pointer''
The defnitions are:
 
long double time_rel_seq_ch[number_of_probes_active][max_nmb_blades*max_nmb_revs];
long double *p_time_rel_puls_1D_ch[number_of_probes_active]={(long double *)time_rel_puls_1D_ch[number_of_probes_active]};
 
Code is:
time_rel_seq_ch[number_of_probes][i]=*p_time_rel_puls_1D_ch[number_of_probes]++
 
I have tried everything and i dont have the knowledge to get past this one.
 
Thanks for your time
0 Kudos
Message 1 of 2
(3,103 Views)
Unless the value of number_of_probes happens to be 0, you have not initialised p_time_rel_puls_1D_ch [number_of_probes], so it has a default value of 0 (under debug, or if declared static). You cannot perform operations (dereference, arithmetic etc) on uninitialised pointers - they must actually point to something first.
 
JR

Message Edited by jr_2005 on 10-08-2007 12:38 PM

0 Kudos
Message 2 of 2
(3,093 Views)