I guess what the guy meant, was that he would like to know how to deal with .dat files. Like, is there some sort of standard which you should follow when reading/writing this kind of file. For example, if you have csv file or xml file, they all have some common patterns that you use, so even if you don't really know what's it for, you can see what's in there, because you know the pattern. If you open .dat file in text editor, you're gonna have some strange symbols popping up. Your first answer, DTS, was therefore not complete.( no offence of course ;) )
However, I'm not educated enough to know answer to this question, and I'm also curious about it.
no they arent fred. they are essentially a language and photo viewers are interpreters. if i write 101010100 to a file that doesnt make it a binary file. and matthew what ur asking is beyond the scope of this post. you need to look at file io and fstream. hes asking about a particular file type
What the beans are you talking about? If you wrote 1s and 0s into a file through a text editor I'd just be ASCII.
they are essentially a language and photo viewers are interpreters.
Have you ever written a BMP loader from scratch? I've messed around with it and I'm telling you BMP files are binary, along with Mp4s, and I know damn well MD2 files are binary, as I'm writing a custom 3D model format based on it.
@lumpkin: i never said a text editor. and i have messed with jpeg bmp stuff like that too. its not written in a binary format. and yes its all bytes. a byte is a unit of storage, not a writing format. each command corresponds to a pixel to generate color
Quick lesson on file types, even if it is a binary file it doesn't mean anything. I have hid files by changing their types like from video to bin so people couldn't open them. All files are written in binumericals <-should be real word), an example of this is the HDD and CPU. The OS (lets use windows) executes notepad.exe and it opens hello.txt. the CPU reads the disk and finds sector 011010000110010101101100011011000110111100101110011101000111100001110100 Once found, the program reads the text document by reading the binary (the file says: hello cplusplus) 011010000110010101101100011011000110111100100000011000110111000001101100011101010111001101110000011011000111010101110011
Anyways what I'm trying to say is just because it isn't executable binary doesn't mean it's not binary.
In the most general sense, all files are binary files. They are all just collections of ones and zeros. Whether a file is considered text or not depends on some level of abstraction.
Files that contain only bit patterns that comprise a coded character set recognized by the system on which the file resides are deemed text files. They are usually processed by programs that expect them to contain only those bit patterns that comprise the character set. However, a file that appears to be a text file might actually not be, and processing it as a text file might result in unexpected behavior.
A file that is a recognized as a text file by programs running on one system may not be recognized as such by programs running on another system. A common example would be a text file encoded in EBCDIC residing on a system where the default character set encoding is ASCII. Unless a program on the ASCII system knows that the file was encoded in EBCDIC and processes it as such, it won't recognize the file as being a text file.
alright im probably wrong because thats what im probably thinking of, however @lumpkin yes it does. what do you think the contents mean. every file in the world has commands even a text file, which would be the ascii values it tells the text editor to print