Hi,
When trying to compile code that users a variable in the array subscript to set the size, CC gives the following error:
Error: An integer constant expression is required within the array subscript operator.
1 Error(s) detected.
The code is as follows:
int main()
{
//blah blah
const int arrSize = numberVariables;
float tempArr[arrSize];
//blah blah
}
Output from CC -V:
unknown% CC -V
CC: Sun C++ 5.9 SunOS_i386 Patch 124864-01 2007/07/25
Output from uname -a:
unknown% uname -a
SunOS unknown 5.10 Generic_137138-09 i86pc i386 i86pc
Any ideas on why CC is giving that error?
~Slow
Edited by: SlowToady on Nov 15, 2008 8:28 PM
Edited by: SlowToady on Nov 15, 2008 8:36 PM