Y
yatko
Hi all;
I have problem about declaration of enum in a class. I want to write
something like that; but it gives error.
class Foo
{
public:
Foo( RunningMode); // compiler gives "RunningMode has
not been declared" error at this point.
private:
enum RunningMode {
BLOCKING,
TIMED_WAIT,
NONBLOCKING
};
const RunningMode mode;
};
When I write the declaration of RunningMode before Foo( RunningMode),
it is ok.
class Foo
{
public:
enum RunningMode {
BLOCKING,
TIMED_WAIT,
NONBLOCKING
};
Foo( RunningMode);
private:
const RunningMode mode;
};
But at this time enum RunningMode is a public declaration, and I want
to declare it as private. How should I write the class ?
Thanks for any help
yatko
I have problem about declaration of enum in a class. I want to write
something like that; but it gives error.
class Foo
{
public:
Foo( RunningMode); // compiler gives "RunningMode has
not been declared" error at this point.
private:
enum RunningMode {
BLOCKING,
TIMED_WAIT,
NONBLOCKING
};
const RunningMode mode;
};
When I write the declaration of RunningMode before Foo( RunningMode),
it is ok.
class Foo
{
public:
enum RunningMode {
BLOCKING,
TIMED_WAIT,
NONBLOCKING
};
Foo( RunningMode);
private:
const RunningMode mode;
};
But at this time enum RunningMode is a public declaration, and I want
to declare it as private. How should I write the class ?
Thanks for any help
yatko