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

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

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.