I'm trying to write a program that will find a substring within a main string, and I'm pretty sure I can do it, if I can just figure out how to take the command line arguments (argv & argv) and turn them into normal strings.
But I'm having trouble doing that, don't even know where to begin, really. I've been trying to us sscanf and read the characters one by one into a char array...but I don't think it's gonna work out, since sscanf doesn't clear the buffer at all...so i'd be reading from the beginning of the string each time. Doh!
Can anyone point me in the right direction? Is there a better function to use?
NOTE: I can't use any of the string.h defined functions.