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.) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2015-02-25 16:34:00 | steve.dower | set | recipients: + steve.dower, larry, tim.golden, zach.ware, serhiy.storchaka |
| 2015-02-25 16:34:00 | steve.dower | set | messageid: <1424882040.13.0.33895663499.issue20323@psf.upfronthosting.co.za> |
| 2015-02-25 16:34:00 | steve.dower | link | issue20323 messages |
| 2015-02-25 16:33:59 | steve.dower | create | |