Solved

FILE AND BINARY FORMAT

Posted on 2003-11-24
5
246 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now