Thread: array of pointers of a struct

  1. #16
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > build_record( records [i], i, lines[i], sep );
    Is this even compiling for you?
    Because it seems to me you're passing a record by value, yet the function in question expects a pointer. If you did pass a pointer (like the function expects), then there would be no need to also return it as well.


    Additionally, the build_record() function is returning a result which you're just ignoring.

    > Maybe i'm wrong, but I've meet several times such problems
    Well if you ignore as many warnings as you seem to, then I'm not surprised at all.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #17
    Registered User
    Join Date
    Mar 2006
    Posts
    23
    Salem,

    you're really hard to be communicated. would you please ignore my message?

    Thanks!

    Paul

  3. #18
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    May as well, because you seem to ignore everyone who has a clue how to solve your problems.

    http://cboard.cprogramming.com/profi...ignore&u=19399
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #19
    Registered User
    Join Date
    Mar 2006
    Posts
    23
    See you guys.

    I don't think I'll be back here.

    Thank those guys who helped me.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MergeSort with array of pointers
    By lionheart in forum C Programming
    Replies: 18
    Last Post: 08-01-2008, 10:23 AM
  2. array of pointers to an array pointers
    By onebrother in forum C Programming
    Replies: 2
    Last Post: 07-28-2008, 11:45 AM
  3. Array of struct pointers - Losing my mind
    By drucillica in forum C Programming
    Replies: 5
    Last Post: 11-12-2005, 11:50 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM