Message236593
| Author |
steve.dower |
| Recipients |
larry, serhiy.storchaka, steve.dower, tim.golden, zach.ware |
| Date |
2015年02月25日.16:33:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1424882040.13.0.33895663499.issue20323@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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.) |
|