Thread: Segfault on dynamic allocation

  1. #16
    Registered User
    Join Date
    Jun 2009
    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:

  2. #17
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    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.

  3. #18
    Registered User
    Join Date
    Jun 2009

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

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, 01: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
    Replies: 6
    Last Post: 07-09-2003, 10:00 PM

Tags for this Thread