initializing a constant in the .h file?
anonymous_at_coolgroups.com
Date: 07/31/04
- Next message: John Harrison: "Re: initializing a constant in the .h file?"
- Previous message: Ioannis Vranos: "Re: C++ standard and C++/CLI"
- Next in thread: John Harrison: "Re: initializing a constant in the .h file?"
- Reply: John Harrison: "Re: initializing a constant in the .h file?"
- Reply: Mateusz Łoskot: "Re: initializing a constant in the .h file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 31 Jul 2004 11:29:58 GMT
hello,
i am attempting to initialize a constant in my .h file. it would be terrific if i
could also assign the constant, but i continue to get compile problems. this
is what i'm trying to do:
(in myfile.h)
const std::string MY_CONSTANT = "permanent value";
but my compiler (gcc version 3.2.1) tells me:
ISO C++ forbids initialization of member
any feedback is appreciated
- Next message: John Harrison: "Re: initializing a constant in the .h file?"
- Previous message: Ioannis Vranos: "Re: C++ standard and C++/CLI"
- Next in thread: John Harrison: "Re: initializing a constant in the .h file?"
- Reply: John Harrison: "Re: initializing a constant in the .h file?"
- Reply: Mateusz Łoskot: "Re: initializing a constant in the .h file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|