I would like to read a file to a string.
I have the following code which can be compiled but cannot be run.
My idea is to use a while loop to append every character in the file to the end of the string until EOF.
char string[50000];
FILE *file;
file = fopen("filename.txt", "r");
char buffer;
while((buffer=fgetc(file)) != EOF)
{
strcat(string, buffer);
}