Esempio
void
foo(
char
*string1,
char
*string2)
{
if
(string1 == string2) {
}
}
Soluzione
Se si desiderava verificare che le stringhe fossero uguali, è possibile scriverlo come riportato di seguito.
void
foo(
char
*string1,
char
*string2)
{
if
( strcmp(string1, string2) == 0) {
}
}