Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

FILE AND BINARY FORMAT

Posted on 2003-11-24
5
Medium Priority
?
274 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 212 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 208 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

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.
Make the most of your online learning experience.
Simple Linear Regression
Introduction to Processes

705 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