开发者

How to convert C# code to C++ [closed]

开发者_如何学Go It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

I have a Data Structure class written in C#. How to convert that to C++ (managed)?


Don't convert it. One of the very nice features of .NET is that the types from one managed language can be used in another. Right-click your C++/CLI project, Properties, Common Properties, Framework and References. Click Add New Reference. Use the Projects tab if your C# project is in the same solution (recommended). Otherwise click the Browse tab and navigate to your C# assembly.


You can see how this is done in the Classes and Structs (Managed) page on MSDN. Just put the equivalent types and logic into your C++ ref class, and you'll make a managed class in C++.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜