lu
Voilà mon code :
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
char *tmp;
unsigned int size;
int main(int argc, char *argv[])
{
FILE *fichier = fopen("fichier.txt", "wt");
if(!fichier)
{
return 1;
}
fseek(fichier, 0, SEEK_END);
size = ftell(fichier);
rewind(fichier);
tmp = (char*)malloc(size);
fread(tmp, sizeof(char*), size, fichier);
cout << tmp<<endl;
}
Voilà quand j'affiche le texte et toute sorte de caractère (²²²²²²||||) apparaît