|
I see. Thanks a lot for clearing all these stuff up for me, grumpy. Also, I knew about cout not being a function, but I had to go afk immediately, and it seems I didn't quite realize what I was typing there. Whatever the case, thanks a lot.
As far as void pointers are concerned, here is the thing I want to do: I want to create a linked list which, apart from the normal data they should contain (a pointer to the next element, and a pointer to the previews one), I want them to hold any kind of data, without having to use templates. Why am I obsessed to do it this way?
Consider it as a learning procedure. I believe that way I can create an interface similar to the Objective C's NSArray, which is an array that can hold any kind of data (ex. in the first slot, you can have an NSSTring and in the second one you can have an NSDictionary). I may not be able to do it (it's just an idea, after all).
Are void pointers the right way to do it?
|