"Stefan Teleman" <stefan.teleman at gmail.com> wrote:

> > "foo.C", line 4: Error: An integer constant expression is required within 
> > the array subscript operator.
> > 1 Error(s) detected.
>
> Because argc is not an "integer constant expression". :-)
>
> #include <iostream>
> using namespace std;
>
> static const int len = 8;
>
> int
> main(int argc, char* argv[])
> {
>     char *acp[len];
>     return 0;
> }
>
> This compiles with Studio 11 and -xlang=c99.

But this is not using VLA code anymore.


J?rg

-- 
 EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin
       js at cs.tu-berlin.de                (uni)  
       schilling at fokus.fraunhofer.de     (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily

Reply via email to