Message 236593 - Python tracker (original) (raw)

Not sure how helpful this is, but the following code compiles fine for me (VC 12.0 and 14.0):

#include <stdio.h>

char myStr[]; struct { char* a; } myStruct = { myStr };

int main() { printf("%s", myStruct.a); return 0; }

static char myStr[] = "123456789";

Any reason you can't define the forward definition like this? (It only seems to work with myStr[] and not *myStr, for some reason.)