I am doing a client/server program where the server checks a linked list for results.
How do I get (or is it even possible) one of the functions in the linked list to return
a buffer space? Like if I wanted the function to search the list and return something like:
for an undetermined amount of lines (titles and artists)...
Currently my linked list specification function is:
void linkedList::Title(string musicArtist)
//create pointer called current
//start at beginning of list ... search until end of list
//if the current finds a node where artist == musicArtist
cout<<current->title<<endl; //print out title
//so there could be zero to several lines printed out to the screen
But the server needs to take what this function finds and return it to the client. How do I get it into a buffer instead of printing out to the screen?
I guess I need to change this from "void" to "char" or "string" ...