I need some help searching an array for a key. I believe that _lfind can do what I want but I dont understand the compare parameter. Why do you need to write a compare function for the command to work and how do you go about writing a simple function to find one string in another string.
At the moment I use this line....
result = (char **)_lfind( &key, ChInfContents, &lengthofcontents,1,NULL);
but it gives me an unhandled exception....access violation
the contents of a INF file is in ChInfContents and the key pointer has the search string in it eg... "hello" I wish to search the ChInfContents[] for "hello"
If anyone can help I'd appeaciate it heaps.
Matt
At the moment I use this line....
result = (char **)_lfind( &key, ChInfContents, &lengthofcontents,1,NULL);
but it gives me an unhandled exception....access violation
the contents of a INF file is in ChInfContents and the key pointer has the search string in it eg... "hello" I wish to search the ChInfContents[] for "hello"
If anyone can help I'd appeaciate it heaps.
Matt