Using fgets, removing last character

This is a discussion on Using fgets, removing last character within the C Programming forums, part of the General Programming Boards category; >>I'd modified the example Ahh, I see. I should've read code closer >>a simple 5 liner code Dude, your cut/paste ...

  1. #31
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>I'd modified the example
    Ahh, I see. I should've read code closer

    >>a simple 5 liner code
    Dude, your cut/paste is up the spout, there's a brace missing from that snippet!
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  2. #32
    C Programmer Stack Overflow's Avatar
    Join Date
    Apr 2004
    Posts
    477
    My bad.
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Function for removing character from a word
    By TheDeveloper in forum C Programming
    Replies: 6
    Last Post: 07-07-2009, 05:30 AM
  2. character set translation
    By password636 in forum C Programming
    Replies: 1
    Last Post: 06-08-2009, 11:45 AM
  3. Problem using sscanf fgets and overflow checking
    By jou00jou in forum C Programming
    Replies: 5
    Last Post: 02-18-2008, 05:42 AM
  4. Mac - Default Lines Endings - fgets() - no worky
    By Dino in forum C Programming
    Replies: 6
    Last Post: 01-30-2008, 10:59 PM
  5. mygets
    By Dave_Sinkula in forum C Programming
    Replies: 6
    Last Post: 03-23-2003, 06:23 PM

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