What is _In_ in C++?

后端 未结 3 1711
旧时难觅i
旧时难觅i 2020-12-29 04:31

I have searched this up rather a lot, but come up with no helpful results.

I am currently trying to program simple DirextX game for Windows 8 Metro, and have come ac

相关标签:
3条回答
  • 2020-12-29 04:47

    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.

    0 讨论(0)
  • 2020-12-29 05:00

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

    0 讨论(0)
  • 2020-12-29 05:11

    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).

    0 讨论(0)
提交回复
热议问题