MSVC++2K5EB bug?

Started by
1 comment, last by Ra 19 years, 4 months ago
Alright, I've been trying to figure out why this code doesn't compile with MS Visual C++ 2005 Express Beta. According to #gamedev it should work fine. Any ideas? I can work around it, but it'd be nice if this actually worked. Note: I'm using C, not C++.

/* ERROR: "initializer is not a constant" on line "{ foo[0] }" */

#include <stdio.h>

char const * const foo[1] =
{
        "test"
};

struct
{
        char const * const blah;
}
const moo[1] =
{
        { foo[0] }
};

int main(void)
{
        printf("blahblahlbahla\n");
}




Ra
Advertisement
I'm running version 8.0.40607.16 (beta1.040607-1600) and that code compiles fine. Not that that's much help to you, sorry.
===========================There are 10 types of people in the world. Those that understand binary and those that don't.( My views in no way reflect the views of my employer. )
Do you have Compile as C Code (/TC) set in Configuration Properties -> C/C++ -> Advanced?
Ra

This topic is closed to new replies.

Advertisement