Thread: Array of Structures and Functions

  1. #1
    zsaniK Kinasz's Avatar
    Join Date
    Jan 2003
    Posts
    222

    Question Array of Structures and Functions

    Can someone show me how to pass an array of structures into a function which will change the structures values.

    I know It involves pointers I'm just not sure of the syntax. I'd also like to be able to pass a mult-dimensional array as well.

    Help is much appreciated.
    "Assumptions are the mother of all **** ups!"

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    15
    something like this

    Code:
    function(struct mystruct **a);
    /*if it will not change them put a const before struct*/
    not sure but that might work!

    -Luke
    I'm with
    <----------- newb!

  3. #3
    zsaniK Kinasz's Avatar
    Join Date
    Jan 2003
    Posts
    222
    thanx i'll give it a go
    "Assumptions are the mother of all **** ups!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Structures, passing array of structures to function
    By saahmed in forum C Programming
    Replies: 10
    Last Post: 04-05-2006, 11:06 PM
  2. array of structures help!
    By voodoo3182 in forum C Programming
    Replies: 12
    Last Post: 08-03-2005, 02:58 PM
  3. passing structures to functions
    By AmazingRando in forum C++ Programming
    Replies: 5
    Last Post: 09-05-2003, 11:22 AM
  4. passing array structures to functions
    By lukejack in forum C Programming
    Replies: 2
    Last Post: 04-08-2003, 02:17 PM
  5. Array of Structures
    By TeenyTig in forum C Programming
    Replies: 1
    Last Post: 02-17-2002, 09:34 PM