On Fri, Mar 20, 2015 at 12:39 AM, Tamas Rudnai wro= te: > I have not seen the original library you use and obviously a C++ is much > more than this, but perhaps you can try to create a structure to store yo= ur > data (as your instance variables) and use bunch of functions that can dea= l > with these struct elements... Now all you have to do is to occupy memory > for the struct and give it's pointer to your functions (C++ does exactly > that in the background, the pointer is called "this"). So a method withou= t > any parameters looks like this: > > myMethod( struct myStruct * this ); > > With one parameter: > > myMethod( struct myStruct * this, char * str ); > > etc... Obviously a C++ compiler is lot more complex than this, you have t= o > implement your very own function name mangling as ANSI C would not handle > usage of same C functions declared with different return type or paramete= r > list. For example the "myMethod" was already used in the no-parameter > example, therefore you should declare: > > myMethod_s_( struct myStruct * this, char * str ); > myMethod_i_( struct myStruct * this, int myInt ); > myMethod_u_i_( struct myStruct * this, unsigned myUnsigned, int myInt ); > Hmm...interesting. I will look into this. I need to take a good look at how many variables are being used everywhere. I don't think it would be too onerous to create a struct for it though. Thanks! Josh --=20 A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .