View Single Post
Old 07-13-2006, 12:26 PM   #8 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
The stdio.h provides the file access functions ie: fopen(), fgetch(), fclose()
This code is ANSI compliant so it should compile with bloodshed without any hassle.

Basicaly what the program does, is:
  • open the text file given as first argument (input file)
  • open (and overwriting) a text file given as second argument (output file)
  • read input file one char at a time
  • Check to see if it's a quote
    • if it's a start-quote refuse to print any <newlines> read from input file to output file, untill end-quote is read
  • print any char read to output file
You would use it like:
Quote:
program my_input_data.txt altered_data.txt
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote