Thread: A problem in part of array.

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    5

    A problem in part of array.

    fscan(fp,%d%f%f, &i, &xi, &yi)
    while not feo(fp)

    Not sure what is going on here
    What is the fp part of this?

  2. #2
    Registered User
    Join Date
    Oct 2007
    Posts
    54
    Quote Originally Posted by dirtydrummer View Post
    fscan(fp,%d%f%f, &i, &xi, &yi)
    while not feo(fp)

    Not sure what is going on here
    What is the fp part of this?
    At first it is not fscan in is fscanf which is used to get the input from the file pointer or the stream . . . And in the above code fp is the file pointer

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    There's no such thing as "feo" either. But there is something called "feof."
    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.

  4. #4
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    format of scanf type function should be a string

    also while(feof(fp)) not good way to read file - read FAQ
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem with large array
    By supi in forum C Programming
    Replies: 2
    Last Post: 07-06-2008, 10:06 PM
  2. Problem with assigning value to array elements
    By sagitt13 in forum C++ Programming
    Replies: 3
    Last Post: 08-17-2004, 11:26 AM
  3. Merge sort please
    By vasanth in forum C Programming
    Replies: 2
    Last Post: 11-09-2003, 12:09 PM
  4. problem with an array of strings in C
    By ornamatica in forum C Programming
    Replies: 14
    Last Post: 05-01-2002, 06:08 PM
  5. From stream/file to a string array problem
    By dradsws in forum C Programming
    Replies: 2
    Last Post: 10-01-2001, 06:24 PM