Menu

Thread Examples

Help
Jeff Davis
2000-04-14
2000-04-14
  • Jeff Davis

    Jeff Davis - 2000-04-14

    Are there any example of this using threads? I have used threads before in C, but never C++. I just need a simple example of how a program looks that starts a thread.

    Thanks,
    Jeff Davis

     
    • David Sugar

      David Sugar - 2000-04-14

      In the demo directory, there is an example, tcpthread.cpp.  Basically, one subclasses a "Thread" base class and impliments a "Run" method for it.  One then constructs the object and calls the "Start" member.  Some example of this can also be found in the code of the ACS project (http://www.bayonne.cx)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.