array of pointers of a struct

This is a discussion on array of pointers of a struct within the C Programming forums, part of the General Programming Boards category; > build_record( records [i], i, lines[i], sep ); Is this even compiling for you? Because it seems to me you're ...

  1. #16
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    > 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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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.

Page 2 of 2 FirstFirst 12
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, 10: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

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