, - . , , , , struct, -, .
Take, for example, the Direct3D11 function ID3D11Device :: CreateDepthStencilState : the transfer is const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc
much clearer than the request for the entire required parameter.
Also, think about variability: you do not need to change this method signature, but only the underlying data structure during refactoring. I found this especially useful when working together, when someone sets the interface and someone else needs to implement it.
source
share