Hi, I want to know how to write a C program that will compare a user's file with what I have in a array (in the c program code). I want to compare my array with what the user file. Is it ok to list each string in my array followed by a comma and then newline? Like:
I want to store my own array of text (to match with what the user enters) in the program.
So if the user's file has sometext2, I want it to compare it with my array (which is there now), and it will not display that line. Just display sometext1 and sometext3.
I'm sure there's a way to compare the array with the user file. I was wondering how I could store each line in the user's file in another array and compare it with my array. Would a for loop do the job or do I have to use strcompare? I will be using FILE * to open the file to read and compare.
It's been a while since I programmed with C. Just need a little help and it'll probably jog my memory.