0

hi guys!

today i tried file writing through VC++ 2010. suddenly a point stroke in my mind to create a file which may not be read by notepad or it gives error or some wrong output as it is mostly seen on opening a pdf file in notepad. for this i tried different formats, (for example: pdf) but this format is also very easy for notepad to read. even the acrobat reader is not reading this file. if anyone can help me, please let me know how to create a pdf file through VC++ or any other format, but the condition is that, file reading must not be possible by notepad.

thanks

4
Contributors
3
Replies
5
Views
5 Years
Discussion Span
Last Post by NathanOliver
0

Ah... How about using .doc format? Don't think notepad reads doc or docx files. I didn't even know it read pdf..
-FH

1

You're probably creating a text file, but then you're just naming it like a PDF. Just changing the file extension doesn't change the data inside the file, it's still just text. That would be like calling your chicken a pig, slaughtering it, and expecting it to taste like pork.

I didn't even know it read pdf..

It doesn't. It can, however, read a text file renamed so it says ".PDF" at the end.

Edited by Tumlee

0

To continue Tumlee's point if you want the data to be in an unbeadable form than you are going to need to learn how to create a data structure and then write the structure to file in binary. One cavet of this is that text is still text in binary.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.