i am trying to make an inventory programme. what i need to know
is how to search strings in a file so i can store information then retreive it later, if anyone knows how to do this that would be appreciated,
cheers
i am trying to make an inventory programme. what i need to know
is how to search strings in a file so i can store information then retreive it later, if anyone knows how to do this that would be appreciated,
cheers
WhAtHA hell Is GoInG ON
Read the file into a buffer
Lookup strstr()
Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.
- Mike McShaffry
This one was given by prelude
Code:const char *sub(const char *m, const char *s){ do { const char *p, *q; for (p = s, q = m; *p == *q; p++, q++) if (*(q+1) == '\0') return s; } while (*s++ != '\0'); return 0; }