I defined a structure as follows.
extern int x;
a = 1;
b = 2;
x = a*b;
struct bStruct
{
unsigned long Cycles;
unsigned long Time;
std::vector<unsigned long> Chunks(x);
};
but x
in the Chunks definition is noted as an error with a red line underneath it.
The error message is:
variable "x" is not a type name.
Why did this error happen, and how do I fix it?