modules && type inheritance?

BCS BCS at pathlink.com
Mon Jun 26 08:47:07 PDT 2006


MM wrote:
> I use derelics for my sdl/opengl application and I wanted to make one module to
> hold all my structures. I don't know much about scope and inheritance of types
> and thus don't know how to make this work :(
> In my structures I use the OpenGL types (GLubyte etc.)
> What do I have to do to make these types visible to other modules?
> Or.. where can I read about this :)
> btw. Is it really necessary to use the gl types iso d types?
> 
> 
import the structures module in any module that will need to use them


<code name="structs.d">
struct foo{int i;}
</code>

<code name="other.d">
import structs;

void main()
{
  foo bar;
  bar.i = 3;
  return;
}
</code>




More information about the Digitalmars-d-learn mailing list