[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
Libcx-List
This sample demonstrates how to load or convert an array of pointers into a list with light code. Remember that the last element in the void** array must be NULL.
Find more on http://www.libcx.net
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
Libcx-List
This sample demonstrates how to load or convert an array of pointers into a list with light code. Remember that the last element in the void** array must be NULL.
// require libcx2.h
list* map_array(void** array)
{
enum_t tmp;
list* l;
//map array to enum_t
m_enum_init2(&tmp,array);
//init a list without "destroy" function
list_init(&l,NULL);
//and call the specialized conversion routine
enum2list(&tmp,l);
return l;
}
Find more on http://www.libcx.net
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
