What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-21 09:50:07
compare strings alphabetically php
Use strcmp. If the first argument to strcmp is lexicographically smaller to the second, then the value returned will be negative. If both are equal, then it will return 0. And if the first is lexicograpically greater than the second then a positive number... Add solution -
C++ 2021-09-05 11:52:02
c++ forbids comparison between pointer and integer
char a[2] defines an array of char's. a is a pointer to the memory at the beginning of the array and using == won't actually compare the contents of a with 'ab' because they aren't actually the same types, 'ab' is integer type. Also 'ab' should be... Add solution