So what it is all about? Simple.
Instead of doing this:
vector$getLength(my_v);one can do that:
my_v->getLength(my_v);Beside the fact that this is probably more convenient notation, methods will not interfere with those in different modules as user can access them only from object reference. Furthermore, user is able to replace any method with his own in particular object. While it is quite powerful it is not the case (I think) it would be wise to do so.
So let me jump right into.
auxilary.h
vector.h
vector.c
main.c
And examples of use:
- stack-like behaviour stack.c
- queue-like behaviour queue.c
- list-like behaviour list.c
- dynamic array behaviour darray.c
- cool c-array wrapper array-wrapper.c
No comments:
Post a Comment