Re: Is this legal?
From: Karl Heinz Buchegger (kbuchegg_at_gascad.at)
Date: 01/20/04
- Next message: Jeff Schwab: "Re: enum question"
- Previous message: Jason: "Re: Is this legal?"
- In reply to: Jason: "Re: Is this legal?"
- Next in thread: Jumbo: "Re: Is this legal?"
- Reply: Jumbo: "Re: Is this legal?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 20 Jan 2004 11:10:14 +0100
Jason wrote:
>
> "Jumbo @uko2.co.uk>" <pcr1000011<nospam> wrote in message
> news:1074575154.993441@news.minx.net.uk...
> ...
> > No it's not legal.
> ...
>
> I can see why the other methods aren't legal - particularly having static
> num, since that would mean the object size was undeterminable at compile
> time.
>
> But isn't this legal then, moving the constant outside? Or are we reduced to
> using #DEFINE GRIDDIM 30 (I heard using defines was evil AND unnecessary)
>
> const int griddim = 30;
>
> class grid{
> private:
> int grd[griddim ][griddim ];
> public:
> grid(); ...
This is fine (if you can live with the fact that griddim
now pollutes the namespace).
-- Karl Heinz Buchegger kbuchegg@gascad.at
- Next message: Jeff Schwab: "Re: enum question"
- Previous message: Jason: "Re: Is this legal?"
- In reply to: Jason: "Re: Is this legal?"
- Next in thread: Jumbo: "Re: Is this legal?"
- Reply: Jumbo: "Re: Is this legal?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]