I spent 5-6 hours today to try to get a working searchfunction for my textfile,
can someone please put me in the right direction?
I have this textfile, its a register over contacts:
Number Contacts = 3*
James Brown:555-12345:james@brown.com
Jack Yellow:555-42345:jack@yellow.com
Sally White:555-12345:sally@yahoo.com
For example, i want to search for "yahoo" and find the sally string.
I cant put a code since i have noone working or close to it.
However, my contacts is in the memory like this:
contact[0]=James Brown:555-12345:james@brown.com
contact[1]=Jack Yellow:555-42345:jack@yellow.com
..and so on.
The closest solution ive tried is "memchr" to compare contact strings with a searchstring,
but cant get it to work, tried to understand it but i dont. Im new to programming.
Maybe its a bad sollution anyway..