Segfault on dynamic allocation

This is a discussion on Segfault on dynamic allocation within the C Programming forums, part of the General Programming Boards category; It is not mistery at all. I don't think I'm hiding something I'm posting all the infos that may needs. ...

  1. #16
    Registered User
    Join Date
    Jun 2009
    Posts
    56
    It is not mistery at all. I don't think I'm hiding something
    I'm posting all the infos that may needs.
    Btw the file it's just 2 lines as I said,
    that are:
    example1
    example2

  2. #17
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,484
    Compile the version I most recently posted.
    Run it with your text file in a console.
    Copy/paste the output exactly as it appears (or take a screen shot).
    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.

  3. #18
    Registered User
    Join Date
    Jun 2009
    Posts
    56
    Hi

    I finally got the error.
    It was in how gdb was started, I always did:
    Code:
    gdb test
    and then inside gdb
    Code:
    run test input_file
    but instead it should be
    Code:
    run input_file
    Unfortunately it is really simple but I did alway the same error.
    Thanks for the help I appreciate it

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dynamic mem allocation, how to get it right?
    By Subsonics in forum C Programming
    Replies: 31
    Last Post: 02-08-2009, 12:41 PM
  2. help with dynamic allocation.
    By Fran in forum C Programming
    Replies: 11
    Last Post: 09-07-2008, 04:25 PM
  3. Dynamic Allocation
    By carrotcake1029 in forum C Programming
    Replies: 4
    Last Post: 04-18-2008, 11:14 PM
  4. dynamic allocation.
    By arjunajay in forum C++ Programming
    Replies: 3
    Last Post: 07-24-2005, 04:21 AM
  5. Dynamic Allocation
    By Darkwraith in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 07-09-2003, 10:00 PM

Tags for this Thread


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