Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An array problem
Message
General information
Forum:
Visual C++
Category:
Coding, syntax & commands
Title:
An array problem
Miscellaneous
Thread ID:
00613107
Message ID:
00613107
Views:
37
If I have a global int NumFields, and need to create an array of that size, I require a constant. Here's what I have at the moment.

const int ArraySize = (const int)NumFields;
Element TempSchema[ArraySize];

This, of course, does not work. "expected constant expression"

Any suggestions ?
Chris Zangarine
Software Development Engineer
Pipeline Compliance System (PCS)
American Innovations
Next
Reply
Map
View

Click here to load this message in the networking platform