ques

This is a discussion on ques within the C Programming forums, part of the General Programming Boards category; how to take the first line of a file (ex. "MCGRATH T"), and create a second file with that very ...

  1. #1
    tim
    Guest

    ques

    how to take the first line of a file (ex. "MCGRATH T"), and create a second file with that very name ("MCGRATH T")?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Read the line from the first file into an array, then use that array as the first argument to fopen for your second file. Note that this will only work well if the line you read is a valid file name.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I need the code of few programs in c++.plzzzzz help...plzzz
    By NAVINKR20 in forum C++ Programming
    Replies: 1
    Last Post: 05-08-2009, 10:13 AM
  2. simple ques, dont no wat these int are doing?
    By jonezy in forum C++ Programming
    Replies: 5
    Last Post: 04-20-2005, 10:03 PM
  3. Short ques
    By Zionaster in forum C++ Programming
    Replies: 4
    Last Post: 07-11-2003, 05:38 AM
  4. simple rand() ques.
    By Beginner2002 in forum C Programming
    Replies: 1
    Last Post: 07-28-2002, 06:42 PM
  5. ques on what to focus on?
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 04-19-2002, 12:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21