0

Hello all. I am working with managed c++ ,cli. I am working on a large project and cannot afford to make any mistakes. In cli from what i have seen usually when i construct classes i use this ^ character to do so, like this

//header file
public ref class something{};

//cpp file
something ^ s;

My problem is with enumerations because you make enumerations without the ref i used for the class something it looks like the fallowing.

//header
public: enum class C{

//cpp
C c;

}

For anything else in managed c++ this would be unacceptable. Is there a ref enum class. If not will there be any problems associated with this. From what i can see this is mixing managed with un-managed, its usually not allowed, but at the moment the compiler lets it go. So whats the deal, and i good to go using it without the ref? thanks all for your eyes and time.

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by Ancient Dragon
0

Will that compile?
I've only seen enums done one way (the same (primitive) way) in both managed or unmanaged code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.