Hello,

I really wonder that is it possible to open any file and play with the data inside it using C/C++ FILE pointer.

I'm taking a lecture called Data Management and File Structures and there we are working with text and binary files.

So I decided to research and work on binary files and try to open and edit them using standart i/o functions and classes. I'm now trying to create and play with a .bmp file. It goes well.

But I want to edit all the files in the system such as .mp3, .exe, .dat, .bin and database files ofcourse.

Is it possible? Can we treat these files as if they all are readable in binary mode? Where can i find any additional information?

Thanks..

Yes of course its possible.

>>Can we treat these files as if they all are readable in binary mode?
Yes, but you may not have permissions to do that. That is an operating systems problem, not C or C++.

How to actually read those files is a different matter altogether. Each file type has its own file format so before you can expect to make anything useful of the data in an *.mp3 file you have to know how it was written. Search google for "mp3 file format". Same with other file types.

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.