#include void main ( void ) { /************************************************************** * Attach to the cdevCollection "brandNew" and add a NULL * terminated list of devices to it. **************************************************************/ cdevCollection & brandNew = cdevCollection::attachRef("brandNew"); brandNew.addRegexp("device?"); /************************************************************** * Use the getList method to obtain the array of names that are * currently stored in the cdevCollection and display them. * Note that the list (not the list items) msut be deleted by * the caller. **************************************************************/ char ** list = brandNew.getList(); for(char **s = list; *s!=NULL; s++) printf("%s\n", *s); delete list; }