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.

public: enum class C{

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.

6 Years
Discussion Span
Last Post by Ancient Dragon

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.