Array of Structures and Functions

This is a discussion on Array of Structures and Functions within the C Programming forums, part of the General Programming Boards category; Can someone show me how to pass an array of structures into a function which will change the structures values. ...

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21