gantonakis Δημοσ. 15 Απριλίου 2011 Δημοσ. 15 Απριλίου 2011 Εχω αυτή την ρουτίνα της C σε Delphi αλλά βγάζει σφάλματα ότι δεν είναι σωστά τα arrays. Πως διορθώνεται αυτό. ????????? Αυτή την Βοήθεια θελω. > C static int tw_list_table[6][11]; static int *a_tw_list_ptrs[18]; void sequences_init(tw_table, a_tw_ptrs) int tw_table[6][11]; int *a_tw_ptrs[18]; { a_tw_ptrs[0 ] = a_tw_ptrs[1] = a_tw_ptrs[2] = tw_table[0]; a_tw_ptrs[3 ] = a_tw_ptrs[4] = a_tw_ptrs[5] = tw_table[1]; a_tw_ptrs[6 ] = a_tw_ptrs[7] = a_tw_ptrs[8] = tw_table[2]; a_tw_ptrs[9 ] = a_tw_ptrs[10] = a_tw_ptrs[11] = tw_table[3]; a_tw_ptrs[12 ] = a_tw_ptrs[13] = a_tw_ptrs[14] = tw_table[4]; a_tw_ptrs[15 ] = a_tw_ptrs[16] = a_tw_ptrs[17] = tw_table[5]; a_tw_ptrs[0][1] = a_tw_ptrs[0][3] = a_tw_ptrs[0][4] = a_tw_ptrs[0][6] = a_tw_ptrs[0][7] = a_tw_ptrs[0][9] = a_tw_ptrs[0][10] = 2; a_tw_ptrs[0][0] = a_tw_ptrs[0][2] = a_tw_ptrs[0][5] = a_tw_ptrs[0][8] = 0; return; } void main() /* ------------------------------------------------------------------------- */ { sequences_init(twist_list_table, a_twist_list_ptrs); ........ return; } Delphi var tw_list_table: array [0..5,0..10] of integer; a_tw_list_ptrs: array [0..17] of pinteger; procedure sequences_init(tw_table: of integer; a_tw_ptrs: array of pinteger); begin a_tw_ptrs[0]:=tw_table[0]; a_tw_ptrs[1]:=tw_table[0]; a_tw_ptrs[2]:=tw_table[0]; a_tw_ptrs[3]:=tw_table[1]; a_tw_ptrs[4]:=tw_table[1]; a_tw_ptrs[5]:=tw_table[1]; a_tw_ptrs[6]:=tw_table[2]; a_tw_ptrs[7]:=tw_table[2]; a_tw_ptrs[8]:=tw_table[2]; a_tw_ptrs[9]:=tw_table[3]; a_tw_ptrs[10]:=tw_table[3]; a_tw_ptrs[11]:=tw_table[3]; a_tw_ptrs[12]:=tw_table[4]; a_tw_ptrs[13]:=tw_table[4]; a_tw_ptrs[14]:=tw_table[4]; a_tw_ptrs[15]:= tw_table[5]; a_tw_ptrs[16]:=tw_table[5]; a_tw_ptrs[17]:=tw_table[5]; a_tw_ptrs[0,1]:=2; a_tw_ptrs[0,3]:=2; a_tw_ptrs[0,4]:=2; a_tw_ptrs[0,6]:=2; a_tw_ptrs[0,7]:=2; a_tw_ptrs[0,9]:=2; a_tw_ptrs[0,10]:=2; a_tw_ptrs[0,0]:=0; a_tw_ptrs[0,2]:=0; a_tw_ptrs[0,5]:=0; a_tw_ptrs[0,8]:=0; end; procedure main(); begin sequences_init(tw_list_table, a_tw_list_ptrs); ..... end; Ευχαριστώ
Προτεινόμενες αναρτήσεις
Αρχειοθετημένο
Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.