Hi,
I have a file on my system which I want to read and store into a pointer variable *int.
This is my code:
FILE * f = fopen ("C:\Dokumente und Einstellungen\Ralfie.MEIRSMAN-232FF2\Desktop\http-get\msvc2008\Debug\Ebay","rb");
int * file = 0;
int * file_begin = file;
while ((*file = getchar()) != EOF){
file++;
}
printf ("Content of file Ebay : %s", file_begin);
int * file is the pointer variable where the content of the file should be stored in.
int * file_begin points to the beginning of the string.
The code compiles well but when executing the code I'm getting in a sort of endless loop. The printf command is never reached.
Can somebody come up with a solution for this trivial problem?
Thanks already.
Ralf.