My problem is as follows. I have a scanfile function that returns me and integer representing the location of the string if it finds it in the file. My next step is writing a function that will take that integer and return me that entire line in that file not just the string. Is there an algorithm thats fast that I can use. Any help is really appreciated. Thanks.