linayang wrote:
this is the "testlist"function which is in "server.cpp"file.
Why isn't it in an include file? Unless you're using a compiler based on EDG you can't export a template definition from a source file and just include the prototype somewhere. Whatever calls testlist needs to see it's full definition - in your case it needs to be introduced into winsock2server.cpp, either by including it or wholesale cut-and-paste.
Cheers,
Ash
PS: Actually, while I'm on the subject...
The router definition needs to be visible to whatever you're compiling testList in as well.