reading data from stdin to structures

Discussion in 'C Programming' started by kittu_phani, Jul 24, 2003.

  1. kittu_phani

    kittu_phani Guest

    Iam very much new to C-programing.Please give the silution for
    following problem.
    How to read data from stdin to array ofstructures

    --
    Posted via http://dbforums.com
    kittu_phani, Jul 24, 2003
    #1
    1. Advertising

  2. kittu_phani wrote:
    > Iam very much new to C-programing.Please give the silution for
    > following problem.
    > How to read data from stdin to array ofstructures
    >
    > --
    > Posted via http://dbforums.com


    There are many ways to do this. Depends on whether
    the data is in ASCII or binary. The binary solution
    may depend on Endianism.

    Write a function to read in a structure. Call this
    function for each structure in the array.

    Structures can be read either as a whole unit or
    each field read individually.

    Without more information, it is hard to get more
    specific. Try reading the FAQ below. If you need
    help, post your code and indicate how it is failing
    and where the problem is.

    See also:
    fread
    fscanf
    fgets

    --
    Thomas Matthews

    C Faq: http://www.eskimo.com/~scs/c-faq/top.html
    alt.comp.lang.learn.c-c++ faq:
    http://www.raos.demon.uk/acllc-c /faq.html
    Thomas Matthews, Jul 24, 2003
    #2
    1. Advertising

  3. kittu_phani

    Chris Dollin Guest

    Chris Dollin, Jul 24, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Johnathan Doe

    peek at stdin, flush stdin

    Johnathan Doe, May 15, 2004, in forum: C Programming
    Replies:
    5
    Views:
    24,963
    Chatoyer
    May 17, 2013
  2. Charlie Zender

    Reading stdin once confuses second stdin read

    Charlie Zender, Jun 19, 2004, in forum: C Programming
    Replies:
    6
    Views:
    787
    Dan Pop
    Jun 21, 2004
  3. Alfonso Morra
    Replies:
    11
    Views:
    713
    Emmanuel Delahaye
    Sep 24, 2005
  4. Ben
    Replies:
    2
    Views:
    1,343
    jacob navia
    Aug 29, 2009
  5. Stefano Sabatini
    Replies:
    6
    Views:
    292
    Stefano Sabatini
    Jul 29, 2007
Loading...

Share This Page