RE: [GD-General] not sure where to post this question... bit C++ implementation specific....
Brought to you by:
vexxed72
From: Richard F. <gd...@th...> - 2004-07-07 14:06:22
|
> If I recall correctly, const floats were treated very > differently from const > ints in VC++. Const floats even generated their own bit of code to be > executed when they were initialized, whereas const ints > became true consts, > so it doesn't surprise me that they can't be used as part of > the array size. > > As some other people pointed out earlier, any reason not to use an > std::vector<> or do dynamic allocation? > > If you don't like having to delete the memory, you can always use > boost::scoped_array: > boost::scoped_array<int> array (new[ (int)( ropeLength / > knotSpace ) ]); its actually more of a "didn't want to have to dereference everytime i needed to access the array". speed issue... The best fix in our situation will be to use defines as far as i can see. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.716 / Virus Database: 472 - Release Date: 05/07/2004 |