2016-03-15 20 views

回答

0

Ç得到輸入沒有「數組大小」的概念,對非有限陣列。實際上,陣列的概念最好不過了。

通常使用的兩個選項是:

  1. 有存儲在陣列沿着「長度」屬性
  2. 零終止陣列,即,指針之後的最後一個元素是零

對於你的情況,我建議兩個中的第一個:

struct mydatastruct 
{ 
    int store_length; 
    struct store 
    { 
     ... 
     int item_length; 
     struct item 
     { 
      ... 
     } it[]; 
     int employee_length; 
     struct employee { 
      ... 
     } e[]; 
    } s[]; 
} mystruct; 
相關問題