C++ function parameters: use a reference or a pointer (and then dereference)?

后端 未结 11 2236
臣服心动
臣服心动 2021-02-05 10:49

I was given some code in which some of the parameters are pointers, and then the pointers are dereferenced to provide values. I was concerned that the pointer dereferencing wou

11条回答
  •  面向向阳花
    2021-02-05 11:19

    You can get the assembly code from your compiler and compare them. At least in GCC, they produce identical code.

提交回复
热议问题