pointer of type WORD???

Erisz99

n00b
Joined
May 1, 2002
Messages
39
Code:
VERTEX *Vertices;
int NumVertices;

WORD *Indices;
int NumIndices;

I then make a reference to Indices here:

Code:
Vertices = new VERTEX[NumVertices];

Indices = new WORD[NumIndices];   //<---- line 47

My error is this:
Code:
Project.cxx:47: error: 'Indices' undeclared (first use this function)
Project.cxx:47: error: (Each undeclared identifier is reported only once for each function it appears in.)
Project.cxx:47: error: syntax error before '[' token

I'm writing this in Mandrake 10.0. My question is what is WORD? Is it possibly M$ exclusive? what are possible solutions?

Thanks in advance!
 
gotta love microsoft shenanigans. They love to use macros up the ass that are a pain in the ass to figure out when they could just use unsinged int like the rest of the world.
 
Whatsisname said:
gotta love microsoft shenanigans. They love to use macros up the ass that are a pain in the ass to figure out when they could just use unsinged int like the rest of the world.
I would think they're there to specify a 32-bit integer (etc) instead of just "int", which is larger than smallint and smaller than long but not explicitly defined by C/C++.
 
lomn75 said:
I would think they're there to specify a 32-bit integer (etc) instead of just "int", which is larger than smallint and smaller than long but not explicitly defined by C/C++.

negatron, they are all defined in windef.h
They are just renamed dupes of the standard data types.
Code:
typedef unsigned long       DWORD;
typedef int                 BOOL;
typedef unsigned char       BYTE;
typedef unsigned short      WORD;
typedef float               FLOAT;
typedef FLOAT               *PFLOAT;
typedef BOOL near           *PBOOL;
typedef BOOL far            *LPBOOL;
typedef BYTE near           *PBYTE;
typedef BYTE far            *LPBYTE;
typedef int near            *PINT;
typedef int far             *LPINT;
typedef WORD near           *PWORD;
typedef WORD far            *LPWORD;
typedef long far            *LPLONG;
typedef DWORD near          *PDWORD;
typedef DWORD far           *LPDWORD;
typedef void far            *LPVOID;
typedef CONST void far      *LPCVOID;
 
Back
Top