Hey guys!

i was wondering how some games and software have image files that are accessed from .dat and/or .bin files!

can i do this for a C++ program? i tried googling but had no hope so i posted here..

i would also like to know how i can make a custom file with custom extensions like .imr or something like that..

and lastly also how i can access images and data from XML files..

Thanks a lot :)

You would need to learn to use the WINAPI or the MFC to use custom files and to save custom files.

Err..... not really. You have no need to register anything with the OS when it comes to extensions. The only reason you need to do that is if you want to create an icon so people can more easily recognize .imr or whatever.

That's excessive work and unless your format is going to be widely used it's a waste of time. However, for personal organization I save things such as name.ss or name.glvs for opengl vertex shader. These have become standard in how I work and windows couldn't care less they just look like generic white files before you click them though.

a .dat or .bin is just a text or binary file that has information for them to open a file either embedded within or saved somewhere else.

Easiest way to do this is use boost::serialization. <- makes making custom files a breeze if you implement it into all your basic 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.