By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,261 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,261 IT Pros & Developers. It's quick & easy.

I wanna know one grammar

P: n/a
I saw JetEngine source.

typedef struct
{
jeVec3d World;
jeVec3d Normal;
jeRGBA Color;
float u, v;
float pad1,pad2;
} jeVertex; // 64 bytes !

why do people use typedef?

my style is

struct jeVertex
{
jeVec3d World;
jeVec3d Normal;
jeRGBA Color;
float u, v;
float pad1,pad2;
};

Are there some reason?
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
!Q

"doojin" <ne******@hotmail.com> wrote in message
news:Xn****************************@218.145.61.76. ..
I saw JetEngine source.

typedef struct
{
jeVec3d World;
jeVec3d Normal;
jeRGBA Color;
float u, v;
float pad1,pad2;
} jeVertex; // 64 bytes !

why do people use typedef?

my style is

struct jeVertex
{
jeVec3d World;
jeVec3d Normal;
jeRGBA Color;
float u, v;
float pad1,pad2;
};

Are there some reason?


yes, C. In C using your 'style' you'd have to use "struct jeVertex v;"
instead of just "jeVertex v;".

Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.