Hi, I want to know how to make a simple action in C.
Open a file and then write in the same line a simple thing:
first a char thats means the name of a player and after 4 spaces or better a \t I need to write his scores.
How should I make this?
I tried to make a simple thing, but didnt worked.
Here is the code, my problems is writing the spaces and the score.. the name I writed perfectly
Thanks for helping!
FILE *fp; //The file...
//Open the file!
if((fp = fopen("scores.dat","a")) == NULL)
printf("Error! Cannot open the file!\n");
//Write #HERE I NEED HELP#
//Now I havent any idea how to make the spaces and to
//output the number two...
//Close the file