Thread: Pointers

  1. #16
    Registered User Doc.'s Avatar
    Join Date
    Dec 2008
    Location
    Jamaica
    Posts
    24
    Quote Originally Posted by laserlight View Post
    Since fflush(stdin) results in undefined behaviour, it is possible that an implementation may actually cause it to "flush" the input buffer.

    Oh, and don't use gets().

    what should i use if not gets?

  2. #17
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    Quote Originally Posted by Doc. View Post
    what should i use if not gets?
    Here is the forum's recommendation http://faq.cprogramming.com/cgi-bin/...&id=1043284351

  3. #18
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Another one: http://cpwiki.net/gets
    And be sure to read the buffer overflow article, especially the example and the quote to see its dangers.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using pointers to pointers
    By steve1_rm in forum C Programming
    Replies: 18
    Last Post: 05-29-2008, 05:59 AM
  2. Replies: 4
    Last Post: 12-10-2006, 07:08 PM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. Staticly Bound Member Function Pointers
    By Polymorphic OOP in forum C++ Programming
    Replies: 29
    Last Post: 11-28-2002, 01:18 PM