Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C file input

Name: Anonymous 2011-10-30 8:27

hey /prog/, i have a C problem

i am making a hang man game
everytime a session is launched, the player choses to play against a player (who inputs a word) or the computer (which selects words from a file)

the thing is, i want to write the words the player inputs inside of the string
if the string is already in the file, it's not added, if not it is added

so far i am able to write things in a file, but every time i start a new session, the new inputted text overwrite what was there before

i am using fopen("derp.txt", "r+");

Name: FrozenVoid 2011-10-30 8:51

Use append mode "ab"

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List