ok i am building a binary tree of char strings and i am trying to use the strcmpi() function to compare strings.
if(strmpi(string,leaf->nstring) < 0)
so if the string is less than the current node string 'nstring' it will be negative causing it to be less than 0 right?
however when i try and compile i only have this one error ;(
btreei.cpp: In method `void binary_tree_node::insert(char *, int, node *)':
btreei.cpp:29: implicit declaration of function `int strcmpi(...)'
am i using the function properly syntax wise and everything or am i just using the wrong kind of funtion for this situation :P
I believe you want stricmp() and not strcmpi()
and make sure you #include <string> or <string.h>
hmm everyone is telling me there is no strcmpi or stricmp? is this in the standard header file library?
o well i will just use strcmp and convert all the words to lowercase before comparing
>hmm everyone is telling me there is no strcmpi or stricmp? is this
>in the standard header file library?
No, it's not a standard function.