Pass struct by reference in C

后端 未结 5 659
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 02:28

Is this code correct? It runs as expected, but is this code correctly using the pointers and dot notation for the struct?

struct someStruct {
 unsigned int t         


        
5条回答
  •  自闭症患者
    2020-12-13 02:57

    That's correct usage of the struct. There are questions about your return values.

    Also, because you are printfing a unsigned int, you should use %u instead of %d.

提交回复
热议问题