finding occurances in a file
I've tried several different methods to this project, using stdio.h and fstream.h
All I want to do is read in a file line by line, search for an occurance of a few characters, then copy the text up to the occurance into a new buffer.
I'm on a school computer and don't have access to the one right now with my code on it, but as soon as I can, I will post what I have. I was using strstr() to find the occurances of a few characters, but it returns a pointer to location of the characters. when trying to replace it with strncpy, I need the number of characters to copy before the occurance. Is there an opposite working function to strspn()? One where it returns the length of string1 until it finds the characters of string2?