How to save a byte type char array data to a file in c++? -


i have char type array[100] 100 bytes stored in it. want write char type byte array file. how this?

i not writing .txt file other format.

thank you.

no need complicated. use old fwrite directly:

file* file = fopen( "myfile.bin", "wb" ); fwrite( array, 1, 100, file ); 

Comments

Popular posts from this blog

All overlapping substrings matching a java regex -

c++ - Using OpenSSL in a multi-threaded application -

php - Deleting/Renaming a locked file -