A
Angus
Hello
I have an enum in a class like this:
enum MessageType
{
GET, //get message (get SAF sequence no.)
RESET, //reset sequence no.
UNKNOWN //unrecognised message
};
In the private section.
And a function like this:
CreateMessage(enum MessageType eType);
But when using the function how do I call it?
eg tried
CreateMessage(GET) and CreateMessage(MessageType.GET) and got error
C2228: left of '.GET' must have class/struct/union type
How do I pass enum to the function?
I have an enum in a class like this:
enum MessageType
{
GET, //get message (get SAF sequence no.)
RESET, //reset sequence no.
UNKNOWN //unrecognised message
};
In the private section.
And a function like this:
CreateMessage(enum MessageType eType);
But when using the function how do I call it?
eg tried
CreateMessage(GET) and CreateMessage(MessageType.GET) and got error
C2228: left of '.GET' must have class/struct/union type
How do I pass enum to the function?