What is _In_ in C++?

ぐ巨炮叔叔 提交于 2019-11-30 05:55:32
James McNellis

It is a SAL annotation, used for code analysis. The annotations themselves are defined as macros that, in normal builds, expand to nothing.

The ^ and ref class are features of C++/CX, a set of language extensions developed to make it easier to build Metro style apps for Windows 8 in C++. Neither is a part of standard C++. The documentation (linked previously) has links to tutorials and references describing the language extensions.

Max

I think (from a quick google) that the _in_ is there to indicate if a parameter is an input or output (_out_) to a function/method.

The ^ is a managed pointer (garbage collected pointer, related to C++/CLI).

Diptendu

_Out_ means argument passed as reference. _In_ means the opposite. (_Out_ x) and (&x) are similar.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!