Re: C++ question - forward declaration for enum?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eljay Love-Jensen <eljay@xxxxxxxxx> writes:

> class X
> {
>     int m;
> public:
>     X(type i) : m(i) { }
>     enum type { one, two, three };
> };
> 
> Is there a forward declaration?  Any proper C++ way to use the enum
> "type" before the full declaration of enum "type"?

No. Can't you just move the enum declaration before the declaration of
the constructor?

-- 
	Falk


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux