[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
Libcx-Vector
This sample demonstrates how to load or convert an array of pointers into a vector 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-Vector
This sample demonstrates how to load or convert an array of pointers into a vector with light code. Remember that the last element in the void** array must be NULL.
// require libcx2.h
vector* map_array(void** array)
{
enum_t tmp;
vector* v;
//map array to enum_t
m_enum_init2(&tmp,array);
//init a vector
vector_init(&v,3,3);
//and call the specialized conversion routine
enum2vector(&tmp,v);
return v;
}
Find more on http://www.libcx.net
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
