Hello I'm trying to figure out how to use a structure variable array like so :
This is the declaration of that struct :
typedef struct tagCORD {
LONG x;
LONG y;
} CORD, *CCORD;
This is the structure array being initialized :
int value;
CORD Cord[value];
This is how I want to use my structure array in my user defined function declaration:
void CordValues(cord[value], int p0x, int p0y, int p1x, int p1y, int p2x, int p2y)
{
Cord[0].x = p0x;
Cord[0].y = p0y;
Cord[1].x = p1x;
Cord[1].y = p1y;
Cord[2].x = p2x;
Cord[2].y = p2y;
}
then in main :
CordValues(cord[2], 100, 125, 200, 95, 270, 155, 270);
so if you still don't understand let me explain it more in-depth
I want to create and be able to use the value of cord and use it within the above user defined function declaration as well as the scope of that user defined function declaration.
Thanks in Advance.
#define value 3
? – Petr Abdulin Apr 19 '12 at 14:28typedef struct
among C++. – Nicol Bolas Apr 19 '12 at 16:46