[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.

// 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

last edited (June 14, 2007) by GCogniaux, Number of views: 700, Current Rev: 1

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.