Its ok, I forgot to use strncmp
Type: Posts; User: Submeg
Its ok, I forgot to use strncmp
I've got the initial search to work, but it doesn't like the surname. It wont let me do this:
players[print].familyName[0];
I can do: players[print].familyName
and say, print the entire...
Ok, the only thing that is not working with the code you suggested was initial and surname search....its not liking them
I know that my code is long. I get that. I don't spend all my time doing this. I am doing this in my spare time. I do not wish to become a programmer. I said that I was going to go back over it once...
Yea I know my code is huge, but I'm not worrying about that right now....just trying to get things 2 work, will deal with it later. But, I have got it to save to the same file....but now in my team...
I am now using a+, but still not adding to the end of file!?
Maybe its my outputFile?
Ok, using "rw" it only leaves what was in the file to begin with, "rw+" as was said by kermit, truncates it so it wipes my first player...
Found that bit....hang on changing now
Ok so here are my functions now(had to add alot to search and add etc...)
functions.h....
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Ok, I have added a player to the array, and have save it into another file, but is there an easy to do a file copy? using "rw" is still sending it to the new file....hmm...
The reason I havent...
I tried that, but it didnt seem to work! It wouldn't update it! would this be instead:
FILE *PdataR = fopen("players.txt", "rw");
and then in the outputFile I use the PdataR FP?
I figured that, so just make the FP point to a new file, then do a readFile for that file and then outputFile to the original? So there is no way to use fclose to free the file for writing?
Hello all,
Ok, I'm trying to make a program that plays a soccer league using random number generators to allocate goals to playing sides. That is all working without any problems. My problem is,...