How to use a struct variable with user defined function

Hello I was hoping someone could tell me how to do this?

how would I use a structure variable array in a function paramater like so :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
typedef struct cord {
  int x;
  int y;
} CORD, *CCORD;


CORD list[number]
void drawrandomness (list[number],x,y,x,y,x,y,x,y)
{

list[0].x = x
list[1].y = y
list[2].x = x
,etc
}


main.cpp

1
2
3
4
5
6
int main()

drawrandomness(list[1]1,0,1,0,20,02,0,);


return 0;
Last edited on
Make the function take a "CORD" as a parameter.
Thats the problem how? :)
What does mean this statement?!

drawrandomness(list[1]1,0,1,0,20,02,0,);
Topic archived. No new replies allowed.