I have a very basic question.
.h
private:
list <int> Stack;
typedef enum
{
Push,
Pop,
Min,
Display
}Operation;
Operation map(string s);
.Cpp:
Operation min_Stack::map(string s)
{
The compiler is not complaining for .h file but for .cpp its giving error : "identifier operation is unidentified".
I am unable to find what I did wrong here.
typedef. Theenumis declared in the scope ofmin_stack.typedef enum(orstruct, orclass){} X;, it's a Cism. Just writeenum X {};.typedefis not required.