[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

How to declare an enum type?

bashill.zhu@gmail.com

9/26/2008 8:52:00 AM

bzhu@TY-PC /h/working/tcplex/ch8/testenum
$ cat lexer.h
namespace Lexer
{
enum Token_value;
extern Token_value string_value;
void get_token();
}

bzhu@TY-PC /h/working/tcplex/ch8/testenum
$ cat lexer.cpp
#include "lexer.h"
namespace Lexer{
enum Token_value{
one,two
};
}
void Lexer::get_token()
{
}



bzhu@TY-PC /h/working/tcplex/ch8/testenum
$ g++ -c lexer.cpp
In file included from lexer.cpp:1:
lexer.h:3: error: use of enum `Token_value' without previous
declaration
lexer.h:4: error: `Token_value' does not name a type

Thanks !

2 Answers

Henry Goodman

10/10/2013 6:36:00 AM

0

On Wednesday, October 9, 2013 11:46:07 PM UTC+1, Giborah wrote:
> On Wednesday, October 9, 2013 11:17:47 AM UTC-7, JJ wrote:
>
> > "Giborah" <hypatia08@gmail.com> wrote in message
>
> >
>
> > news:e69c4580-6474-44e3-b4b7-0f3b760285ec@googlegroups.com...
>
> >
>
> > > How boring. Same old same old. Three Jewish scientists winning the
>
> >
>
> > > Chemistry Prize. Stand by for next awards.
>
> >
>
> > >
>
> >
>
> > I think you should have put a smiley at the end of that one. You're probably
>
> >
>
> > as proud as I am.
>
> Aw, c'mon Jay, smiley implicit. Busting my britches.
>
>
>
> Only sorry that the Physics prize for the Higgs Boson* could not be awarded to the other five scientists who came up with the same thing, more or less. Hagen, ISTR, went public about his hopes some months ago.
>
>
>
> *One of my on-line identities
>
>
>
> REALLY busted my britches in 2009 when a Israeli woman Dr, Ada Yonath was co-winner of the Nobel for Chemistry.
>
>
>
> http://en.wikipedia.org/wiki/...
>
>
>
> Her work, as you will note, was in crystallography.
>
>
>
> Reminds me painfully of the great Jewish female crystallographer, Rosalind Franklin. She died young of cancer, never knowing that her ground-breaking work had been stolen from her laboratory by co-worker Maurice Wilkins, who conspired with Watson and Crick, his co-winners of the Nobel for DNA structure.
>
> Would they have made the discovery, with all that followed, had they not had possession of Rosalind Franklin's crystallography...?
>
>
>
> Watson's book "The Double Helix" contains some truly juvenile, snot-nose, disgusting passages about Rosalind Franklin, who was such a lady that even from her grave she probably would have kept her British manners.
>
>
>
> Quite a "cult" in the best sense has grown up around Rosalind Franklin, of which I am a proud member.
>
>
I agree. I have seen her grave in Willesden Jewish cemetery.
Henry Goodman

Malcolm McLean

10/10/2013 12:58:00 PM

0

On Wednesday, October 9, 2013 11:46:07 PM UTC+1, Giborah wrote:
>
> Watson's book "The Double Helix" contains some truly juvenile, snot-nose,
> disgusting passages about Rosalind Franklin, who was such a lady that
> even from her grave she probably would have kept her British manners.
>
He knew her, you and I didn't.

The Nobel prize cannot be awarded posthumously, which is a reasonable rule,
and it can't be awarded to more than three people, which is another reasonable
rule. Since Rosalind Franklin died before the award, the question of whether
she should have been included didn't arise. However she managed to fool
herself that her images weren't showing a characteristic helical pattern,
when her supervisor knew full well that they did. It certainly wasn't a case
of the discovery being stolen from her. There were some personal animosities,
but in the nature of things it's hard to judge who was a fault, and
really a pretty pointless exercise.