开发者

How do I pass function variables by reference in C++/CLI?

开发者 https://www.devze.com 2023-02-03 19:55 出处:网络
How do you define ref in C++/CLI? In C#, we can write: public override void myfunction(TokenStream tokenStream, ref开发者_Python百科 string outliningKey,

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) { .... }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号