How do I pass function variables by reference in C++/CLI?
How do you define ref
in C++/CLI?
In C#, we can write:
public override void myfunction(TokenStream tokenStream, ref开发者_Python百科 string outliningKey,
ref OutliningNodeAction tokenAction);
So in C++/CLI, I tried to write:
public:virtual void myfunction(TokenStream ^ tokenStream,
ref String ^ outliningKey, ref OutliningNodeAction tokenAction)override
I want to define String ^ outliningKey
AND OutliningNodeAction tokenAction
to ref
in C++/CLI, but we don't have any ref
keyword in C++/CLI.
Can anyone help me to define myfunction Variable to ref mod?
Use this syntax:
public: virtual void myfunction(String ^% outliningKey) { .... }
精彩评论