Solved

FILE AND BINARY FORMAT

Posted on 2003-11-24
5
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Plain Text Editor for iPad 6 105
Cygwin - GNU GPL License 1 45
Using Third Party DLL with Access VBA 14 51
incorrect syntax near the order by 10 57
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

749 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