C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-01-2005, 12:09 AM   #1
Linux User
 
Join Date: Nov 2005
Location: Bellingham, WA
Posts: 35
Help with binary files

How do I create a code that can read binary files and copy what they say into a text file titled "out_file.txt". Needed for a program I am creating.

NOTE: Thanks in advance for anyone who knows how to solve this problem!
tuxinator is offline   Reply With Quote
Old 12-01-2005, 12:21 AM   #2
cwr
Registered Luser
 
cwr's Avatar
 
Join Date: Jul 2005
Location: Singapore
Posts: 867
open the binary file(s) for reading
open the text file for writing (using a text mode specifer)
for each binary file, read it, write to the text file.
cwr is offline   Reply With Quote
Old 12-01-2005, 12:26 AM   #3
Linux User
 
Join Date: Nov 2005
Location: Bellingham, WA
Posts: 35
Smile I've Tried that

I have tried that technique but it did not work. I think I need to use the fread and fwrite functions according to the FAQ page. Although I am unsure how to use those functions and have failed in finding information on how to use them. Thank you!!
tuxinator is offline   Reply With Quote
Old 12-01-2005, 02:11 AM   #4
+++ OK NO CARRIER
 
quzah's Avatar
 
Join Date: Oct 2001
Posts: 10,640
You should befriend your local man page.
__________________
Hundreds of thousands of dipshits can't be wrong.


Are you up for the suck?
quzah is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking header files, Source files and main program(Accel. C++) Daniel Primed C++ Programming 3 01-17-2006 11:46 AM
send/recv binary files using sockets in C++ dafatdude Networking/Device Communication 14 07-25-2004 11:00 AM
MFC: CStrings & binary files question(s) BrianK Windows Programming 0 06-24-2004 05:41 PM
Binary files Brian C Programming 2 02-18-2002 01:13 PM
storing string objects to binary files Unregistered C++ Programming 2 10-06-2001 11:33 PM


All times are GMT -6. The time now is 07:06 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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