pass array by reference in c

Posted by Yassir on Stack Overflow See other posts from Stack Overflow or by Yassir
Published on 2009-07-09T23:27:50Z Indexed on 2010/04/12 23:53 UTC
Read the original article Hit count: 253

Filed under:

How can I pass an array of struct by reference ?

example :

struct Coordinate {
   int X;
   int Y;
};
SomeMethod(Coordinate *Coordinates[]){
   //Do Something with the array
}
int main(){ 
   Coordinate Coordinates[10];
   SomeMethod(&Coordinates);
}

© Stack Overflow or respective owner

Related posts about c