Hello i am a new c++ user and i got a little problem using the binary write.
I m trying to transform a string into a binary but first of all the string stay a string and it only show the 4 first letter.
Here is my script and just to tell u the string is pretty big.
this fonction is storing a large number of data used in a game i m building but i was building it with a txt file first and got files of 32 mb so i wanted to reduce memory needed.
my goal is to creat a binary file containing value of object (which are cube right now) and that would represent there position into a 3d world.
right now i am not able to transform my string into binary :S
i tryed lots of solution and searched and found nothing that could help me making it possible :S
alright all those code are working great thank you.
But i still got the same problem (it show like if i was writing a text file and keep the same size which is 27 mb.
Wasnt it supose to transform all those text into binary character?
One of the good things about binary files is the random access. To acomplish that all the registers should have the same size.
That is the purpose of the copy
@firestat: You are converting all your data to a string representation before writing it. The result will be the same as if it was plain text.
Alright i had one compression system but wasnt able to use it.
Thx for the help!
I Will find tutorial on how to use compression system and reading those compression right after. :)
Thx for the help.