if(stat("seek.pc.db", &files) ==0 )
sizes=files.st_size;
sizes=sizes/sizeof(int);
int s[sizes];
I am compiling this in Visual Studio 2008 and I am getting the following error:
error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0.
I tried using vector s[sizes] but of no avail. What am I doing wrong?
Thanks!
The sizes of array variables in C must be known at compile time. If you know it only at run time you will have to
mallocsome memory yourself instead.