That's the thing... If I make a char* at the top of my main function like this:
Code:
char* test[256] = {"Billy"};
findName(test, searchresult);
It works fine and it searches through the text file and finds "Billy" and out puts Billys line which is:
Billy Brown 18
It has something to do with what Buffer contains, when I printf buffer, it just says Billy...
but I'm sure it's containing something else after that maybe some left over stuff from newsockd or something... what can I do to make sure that basically the buffer array of chars contains only the name, similar to when I just declare an array like above (in the code snippit).
Any ideas?
Again, help is VERY appreciated!
Thanks!