"Christopher" <> wrote...
> I have been told to complete an assignment in a linux enviroment. I don't
> have it so I started up my copy of VS. I am not allowed to alter the files
> supplied to me, but only to implement the blanks, blah. well the
instructor
> made the following statement:
>
> class foo
> {
> public:
> const int MAX_DATA_SIZE = 30;
> // ...snipped
> };
>
> my compiler doesn't like that idea and gives me an error regarding the
> assignment of a value there.
Outdated compiler. Nothing you can do about it, really.
> so my question is: what does the standard have to say about the line in
> question so that I can justify
> my remaking it into a #define or not?
The Standard says it's allowed.
If you aren't supposed to change anything that is already there,
find a better compiler. MinGW should do it (it's basically GCC).
Victor
|