22 lines
543 B
C++
22 lines
543 B
C++
#include <iostream>
|
|
#include <string>
|
|
#include "cstdio"
|
|
|
|
using namespace std;
|
|
|
|
string header(unsigned int content_size){
|
|
char head[32] = {0xAF, 0x90, 0x88, 0x9A, 0x8D, 0xAA, 0xAC, 0xBD,0x31, 0x00, 0x10, 0x00, 0x10, 0x00, (content_size& 1) + 0x41,
|
|
0x01, content_size >>24, content_size >>16 , content_size >>8, content_size , (content_size& 1) + 0xB8};
|
|
|
|
|
|
FILE* fichier = NULL;
|
|
|
|
fichier = fopen("test.hexadecimal", "wb+");
|
|
|
|
for(int i = 0 ; i<32; i++)
|
|
fputc(head[i], fichier);
|
|
fclose(fichier);
|
|
|
|
return head;
|
|
}
|