I have a function that takes in two strings, and I want to, let’s say compare the 2nd letter of each string to the other.
How do I fix this statement:
if (strncmp(str1 + 1, str2 + 1) != 0) {
...
I get an error stating that passing the argument makes a pointer from an integer without a cast.
1 Answer