The following #includes are needed for the examples on this page 
#include <dds/sub/ddssub.hpp>
#include <dds/domain/ddsdomain.hpp>
#include <dds/core/ddscore.hpp>
  
Setting up a subscriber
- Create a Subscriber with each of the available constructors 
    
    
    
    
    
    
    
    ExampleSubscriberListener *listener = new ExampleSubscriberListener;
    
    
    
    
    subscriber3.close();
    
    
   
Looking up Subscribers
- Lookup Subscribers 
void howto_lookup_subscribers()
{
    
    create_and_retain_subscriber(participant);
    create_and_retain_subscriber(participant);
    create_and_retain_subscriber(participant);
    
    
    std::vector<dds::sub::Subscriber> subscribers1;
    
    
    int subscriber_count = 
    
    
    
    subscriber_count = 
    
    for (std::vector<dds::sub::Subscriber>::iterator it = subscribers1.begin();
          it != subscribers1.end(); 
          it++) {
        (*it).close();
    }
}
{
}
   
Tearing down a subscriber