Solved

FILE AND BINARY FORMAT

Posted on 2003-11-24
5
257 Views
Last Modified: 2010-04-17
Hi all,
   I need to write data into my file in binary format directly. Like, say i need to write "Hello" into my file and while writing , it should be in binary format. I can't use fopen mode as "wb+" as it  can just convert into to binary format  while writing it into the file. But, i want my "hello" string to be in binary format when i use fprintf for "hello".Can somebody help me with this.Is there any single step to get it done?  
0
Comment
Question by:motian
5 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 53 total points
ID: 9809180
Hi motian,

I think you are not yet clear about the concept of binary format ...
pls go through this link
http://www.webopedia.com/TERM/B/binary_file.html
http://www.webopedia.com/TERM/B/binary_format.html
http://www.learnthenet.com/english/glossary/binary.htm

Cheers!
Sunny:o)
0
 
LVL 1

Assisted Solution

by:gabbitaravi
gabbitaravi earned 52 total points
ID: 9815809
hi,
IF ur using CFile of MFC, The following mode allows u to create a binary file
InFile.Open(FilePath, CFile::modeRead | CFile::typeBinary);
U need to store each record in a structure and write the structure into a binary file.
with warm regards,
ravi kiran
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question