I apologize in advance for the question if it seems too "childish", but the question is:
Here is such a simple code:
#include <iostream>
struct my_struct
{
struct fictitious_name fn_struct;
};
int main()
{
}
It is not compiled because the fictitious_name structure is not defined.
But then if I rewrite it thus:
#include <iostream>
struct my_struct
{
struct fictitious_name* fn_struct;
};
int main()
{
}
Then everything is fine, the code is compiled, but the fictitious_name structure is still undefined. Why does a pointer to a non - existent structure work ?