Pages: 1 [2]   Go Down
Author Topic: Forward declarations of const struct arrays  (Read 1864 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So you agree that at least one extern is required.

It is if you want a forward declaration of a const.
If you have two declared structs whose members point to one another it seems as though it is more than a matter of preference.

I have no idea what you mean.
typedef struct foo{
    byte *bar;         //bar is a pointer to byte
    int anotherElementInAFoo;

const FooUser[] = {
    {(foo *)oof,42}  //not allowed

As opposed to
char foo = 'x';
char * bar = &foo;
int ASCIIofFoo = (int *)bar;  //okaly-dokely


Pages: 1 [2]   Go Up
Jump to: