[Dev-C++] Confused about a compiler error!!
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Maya <Esc...@ne...> - 2003-12-26 14:52:52
|
namespace Merry{
class Christmas{
public:
// This line is fine!
static const std::ios_base::openmode To_all = std::ios_base::in;
// The below line triggers an error ?
static const std::ios_base::openmode To_Ya =
std::ios_base::out | std::ios_base::app;
protected:
///Bla, bla, bla
};
}
Gives me the following error:
finelname:line: field initializer is not constant
Why is it that 'Merry::Christmas::To_all' is a prblem for the compiler,
but 'Merry::Christmas::To_Ya' is otherwise?
Anybody?
By the way, what I want is to have access to those variables from
another program, using the scope specifiers, will that do the trick?
--
FYI
http://www.astro.umd.edu/~marshall/abbrev.html
E-Mail Policy
http://www.vif.com/users/escalante/Email_Policy.html
* You cannot exercise your power to a point of humiliation.
- Jean Chretien
* The media's the most powerful entity on earth. They have the
power to make the innocent guilty and to make the guilty
innocent, and that's power.
- Malcom X
* "Innocent until proven guilty", no... not in Canada!!
|