Topic: enum namespace conservation
Author: ekaulaki@kaulakis.win.net (Edward C. Kaulakis)
Date: Wed, 13 Jul 1994 01:55:37 GMT Raw View
#include <iostream.h>
struct Foo{
enum {Able,Baker,Charlie};
};
struct Bar{
enum {Baker, Butcher, Tailor};
};
int main()
{
if (Foo::Baker != Bar::Baker)
cout << "I doan' need no steenkin' namespace!" << endl;
return 0;
}
--
Edward C. Kaulakis (Voice)(805)296-0303
21847 Agajanian Ln., (Fax) (805)296-4718
Santa Clarita CA 91350 ekaulaki@kaulakis.win.net
I *sell* my opinions. But for you, a special price! $0.02!
Author: kevlin@wslint.demon.co.uk (Kevlin Henney)
Date: Wed, 13 Jul 1994 15:21:11 +0000 Raw View
In article <126@kaulakis.win.net> ekaulaki@kaulakis.win.net writes:
>#include <iostream.h>
>
>struct Foo{
>enum {Able,Baker,Charlie};
>};
>
>struct Bar{
>enum {Baker, Butcher, Tailor};
>};
>
>int main()
>{
>if (Foo::Baker != Bar::Baker)
> cout << "I doan' need no steenkin' namespace!" << endl;
>return 0;
>}
The above code can be optimised:
int main()
{
cout << "I doan' need no steenkin' namespace!" << endl;
return 0;
}
:-)
--
Kevlin A P Henney
synonymicon is another word for thesaurus