Results 1 to 23 of 23

Thread: array of struct by reference ** RESOLVED!!!**

Threaded View

  1. #1

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545

    array of struct by reference ** RESOLVED!!!**

    Hi,

    I need help setting up the prototype, the actual function header, and the code used to modify the structure being sent to the function. I need to pass the array of this structure by reference so that any changes made change the original data sent in.

    THis is what I have so far.

    VB Code:
    1. 'My prototype
    2. int getlegalmoves(struct postype pos, struct movetype *movelist[]);
    3.  
    4. 'The function code
    5. int getlegalmoves(struct postype pos, struct movetype *movelist[])
    6. {
    7.     movelist[0].from = 1;
    8.     movelist[0].to = 2;
    9.     movelist[1].from = 3;
    10.     movelist[1].to = 4;
    11. }
    Last edited by ae_jester; Dec 21st, 2003 at 04:36 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width