Thread: How can I make a program to read the first line "There_is_a_dog" consecutively?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    26

    How can I make a program to read the first line "There_is_a_dog" twice?

    Dear all,

    In my application, there are some sentences (each per line) to be read from the txt file, e.g.

    There_is_a_dog
    There_are_two_men
    ...

    I used fscanf_s to read them each per line (actually, it should be "each per white space"). However, how can I make a program to read the first line "There_is_a_dog" twice? E.g. after executing the first "fscanf_s" to read "There_is_a_dog", how can I guide the program to read "There_is_a_dog" again in the stream? Is there a way of doing that? I wanna google it, while haven't find any answer yet and it is hard for me to find some keywords to describe the problem.

    Hopefully, I described it crystal clear.

    Bests,

    Qing
    Last edited by qingxing2005; 06-16-2008 at 02:55 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. want to make this small program...
    By psycho88 in forum C++ Programming
    Replies: 8
    Last Post: 11-30-2005, 02:05 AM
  3. unable to read double A[0] and A[1] when n=1
    By sweetarg in forum C Programming
    Replies: 2
    Last Post: 10-25-2005, 12:35 PM
  4. how do you make a program send data to the printer?
    By Sintu in forum C++ Programming
    Replies: 19
    Last Post: 10-20-2005, 07:22 PM
  5. How do I read file line by line?
    By Blurr in forum C Programming
    Replies: 1
    Last Post: 09-22-2001, 12:32 AM