I tried the code below but it did not work
The big problem is fscanf putting each character of the text in an array position
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int a;
char texto[1000];
FILE *file;
file = fopen("texto.txt", "r");
//fscanf(file, " %c", &texto);
fscanf(file, " %c", texto);
if (file == NULL) {
printf("Arquivo nao pode ser aberto\n");
return 0;
}
a=0;
do{
printf("%c", texto[a]);
a++;
} while (a<1000);
}