two main in visual c++ -


How do I run two main Visual Studio (Visual C ++) .. I would like to be a key that represents it The server is a main client and they are run to run on two different consoles. How can i do

Create two functions:

  int server_main (Int argc, char * Argv []); Int client_main (int argc, char * argv []);   

In the real

  int main (int argc, char * argv [])   

check for one Command line argument (--server or --client) and after that, which exists, server_main or client_main on the basis of delegation.

When it comes to debugging, those who have already been recommended VS Two different examples of

Everything else is right in pointing out that there can be only one "main", but I think it really wants to ask you.

Comments