|
-
August 2nd, 2009, 02:47 PM
#1
Why not dynamic char array sizing
Just wondering about creating a dynamic string array
int i = this->txtMain->Text->Length - 1;
char x[i];
This gives me 3 errors
Error 1 error C2057: expected constant expression
Error 2 error C2466: cannot allocate an array of constant size 0
Error 3 error C2133: 'x' : unknown size
Can someone explain to me why. Im a n00b
Thanks
Last edited by thomas49th; August 2nd, 2009 at 02:48 PM.
Reason: change title
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|