searchable void* container
-
hi every1 will u plz help me on this ... im creating a generic container class and im implemeting it using the (void*) pointer technique but to add a search feature, the search function should compare two (void*) variables, i dont know how to do that! i think memcmp could be used somehow but the problem that it needs a length parameter which is now available!! thanks already
-
hi every1 will u plz help me on this ... im creating a generic container class and im implemeting it using the (void*) pointer technique but to add a search feature, the search function should compare two (void*) variables, i dont know how to do that! i think memcmp could be used somehow but the problem that it needs a length parameter which is now available!! thanks already
you are on the C++/CLI forum[^], while you question is for the Visual C++ forum[^] next time, be careful... and for you problem, do you code in C or C++ ? because C++ provides templates, that may certainly interrest you...
-
you are on the C++/CLI forum[^], while you question is for the Visual C++ forum[^] next time, be careful... and for you problem, do you code in C or C++ ? because C++ provides templates, that may certainly interrest you...
oh im sorry for this mistake anyway it doesnt really matter if its a c or c++ but for templates they are not compliant with the c++ standard so i think using the void* will be safer!!
-
you are on the C++/CLI forum[^], while you question is for the Visual C++ forum[^] next time, be careful... and for you problem, do you code in C or C++ ? because C++ provides templates, that may certainly interrest you...
It looks like most questions for this forum are off topic... John -- modified at 9:16 Tuesday 7th March, 2006
-
oh im sorry for this mistake anyway it doesnt really matter if its a c or c++ but for templates they are not compliant with the c++ standard so i think using the void* will be safer!!
Amr Shahin wrote:
oh im sorry for this mistake
It's an easy mistake to make unless you read the main forum page that explains the topic of each forum: http://www.codeproject.com/script/comments/forums.asp[^] John
-
It looks like most questions for this forum are off topic... John -- modified at 9:16 Tuesday 7th March, 2006
-
oh im sorry for this mistake anyway it doesnt really matter if its a c or c++ but for templates they are not compliant with the c++ standard so i think using the void* will be safer!!
Amr Shahin wrote:
ut for templates they are not compliant with the c++ standard so i think using the void* will be safer!!
are you on drugs ?! :wtf::omg: templates are part of and are defined in the standard !!!!! hey,, i think you should really revise you judgement about templates, and learn a bit more about them...
-
oh im sorry for this mistake anyway it doesnt really matter if its a c or c++ but for templates they are not compliant with the c++ standard so i think using the void* will be safer!!
Amr Shahin wrote:
i think using the void* will be safer!!
Templates were not finalized until the mid to late 90s so compliers created before this may have a problem with them but as long as you stick to the basics and don't use partial template specialization and a few other features you will be fine on older compilers. I have been using templates for at least 5 years starting with VC6 (which is not fully compliant but very capable of using templates). void* is definitly not the way to go if you are using c++. John -- modified at 12:09 Tuesday 7th March, 2006
-
John M. Drescher wrote:
It looks like most questions for this forum are off topic...
true, but if people had a look at the admin note... :doh:
Although I have seen it in the lounge I did not even notice it in this forum today... John
-
It looks like most questions for this forum are off topic... John -- modified at 9:16 Tuesday 7th March, 2006
John M. Drescher wrote:
It looks like most questions for this forum are off topic...
True, but i blame MS marketing for this. Most people consider CLI to be "command line interface", not "common language..." (what the heck is I for anyway?).
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-
John M. Drescher wrote:
It looks like most questions for this forum are off topic...
True, but i blame MS marketing for this. Most people consider CLI to be "command line interface", not "common language..." (what the heck is I for anyway?).
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.