Thread: fgets

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    3

    Unhappy fgets

    Fgets should read in sentences right? In my code I used
    if((fgets(sentence))==NULL);
    return NULL;
    but when I want to print the sentece out it comes out as word by word, each on a newline. How do I correct this?
    Thanks....in advance

  2. #2
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    The world is waiting. I must leave you now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. fgets not working after fgetc
    By 1978Corvette in forum C Programming
    Replies: 3
    Last Post: 01-22-2006, 06:33 PM
  2. problem with fgets
    By learninC in forum C Programming
    Replies: 3
    Last Post: 05-19-2005, 08:10 AM
  3. problem with fgets
    By Smoot in forum C Programming
    Replies: 4
    Last Post: 12-07-2003, 03:35 AM
  4. fgets crashing my program
    By EvBladeRunnervE in forum C++ Programming
    Replies: 7
    Last Post: 08-11-2003, 12:08 PM
  5. help with fgets
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 10-17-2001, 08:18 PM