Reputation: 9
FYI I am fairly new to coding in C. I am looking for a way to search a .txt file for a certain word that is inputted by the user and counts the number of times it occurs within the .txt file. I currently have the .txt file in a 2D array. I have no idea how to even start. Please help!
Upvotes: 0
Views: 78
Reputation: 81724
You can start with the standard library function strstr
. Read the description, and think about how you'd apply it to your 2D array (of, presumably, char*
).
Upvotes: 1