Array size at run time without dynamic allocation is allowed?

前端 未结 8 1697
一个人的身影
一个人的身影 2020-11-22 02:08

I\'ve been using C++ for a few years, and today I saw some code, but how can this be perfectly legal?

int main(int argc, char **argv)
{
    size_t size;
             


        
8条回答
  •  遥遥无期
    2020-11-22 02:24

    It is valid only in C99. Next time you may try checking your code in a reliable compiler.

提交回复
热议问题