Returning multiple values from a C function

前端 未结 11 1060
醉话见心
醉话见心 2021-01-18 08:05

Important: Please see this very much related question: Return multiple values in C++.

I\'m after how to do the same thing in ANSI C? Would you use a

11条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-18 08:43

    Keep in mind that sometimes is faster to pass parameters by value and update on return (or make local copies on the stack) than by reference... This is very evident with small structures or few parameters and lots of accesses.

提交回复
热议问题