#How to put each individual word of a text file into an array?

9 messages · Page 1 of 1 (latest)

river meteor
#

Hi, for a Typing speed test project I'm doing I need to put every individual string into an array, to calculate the wpm at the end and also to compare it word for word for spelling check,

I've already gotten the file using fgets(), how do I now put each string into an array?

calm stirrupBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

teal frigate
#

copy them to it

river meteor
sleek viper
#

yeah

#

on every iteration of fgets you copy the current string to the array

#

Make sure the array has enough space

river meteor
#

!solved