char chr(int keycode) ???
Is there a function in GlibC that can do it for me?
char FunctionName(int keycode)
The problem is that I read from a file with:
int fgetc (FILE * stream);
and i want to append that char to a string:
char * strcat ( char * dest, const char * src );
but the:
char * fgets (char * string , int num , FILE * stream);
does not work correctly. It reads in something completely different on certain cases.
For example the string in a textfile:
P6hja-Ameerika
Will be printed with mvprintw and something like that (not exactly):
P6hja-Ameeri^A^Bka
And some other words cause different phenomena characters.
I don't know why but I thought to give a try to fgetc. Or maybe someone knows the deal with fgets. I wanna read from a file char-by-char to know exactly what I'm reading.
Leho Pärnapuu
Last edited by joakim12; 04-22-2004 at 04:23 AM.
|