Passing an array of structs in C

后端 未结 9 866
傲寒
傲寒 2020-12-01 16:33

I\'m having trouble passing an array of structs to a function in C.

I\'ve created the struct like this in main:

int main()
{
    struct Items
    {
          


        
9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 17:31

    Have you tried to declare you function like this:

    void ReadFile(struct Items[])
    

    Might be helpful: http://www.daniweb.com/software-development/cpp/threads/105699

提交回复
热议问题