Clear questions and runnable code
get the best and fastest answer
Re^3: Reading through a file and checking for a specific stringby vihar (Acolyte)
|on Aug 20, 2013 at 13:35 UTC||Need Help??|
Thanks! This works flawlessly.
I just had one more question. How do I avoid printing out values that are not found? So currently it prints out all 5 even if one of the match is not found.
AB : 135172
FG : 248782
AD : 64
AE : 0
AC : 0
I would like to avoid AE and AC in this case since they are not found.
Also, two more requirements just came up. There is a one word description attached to each string I am supposed to find and they are supposed to be printed alphabetically.
Would I need to make a separate array to print out description next to each string I am printing? This is what the result should look like:
AB(ABYUSID) : 135172
FG(FGIUIO) : 248782
AD(ADHGUT) : 64
AE(AERUTOT) : 0
AC(ACVHGTI) : 0
Would I need to store these one word descriptions in a separate array and print from there? I tried doing it that way but then it becomes infinite loop and keeps printing these values every time they are found
Thanks for all the help!