Copying arrays of structs in C

后端 未结 6 967
后悔当初
后悔当初 2021-02-06 12:03

It\'s been a long since I don\'t use C language, and this is driving me crazy. I have an array of structs, and I need to create a function which will copy one array to another (

6条回答
  •  不知归路
    2021-02-06 12:37

    The easiest way is probably

     b=a
    

    although a solution with memcpy() will also work.

提交回复
热议问题