I saw a few lines of code in a C++ tutorial video
void copy_string(char* from, char* to)
{
while ((*to = *from) != '\0')
{
to++;
from++;
}
}
The function is used to copy the string "from" into the string "to", but I can't understand the conditional statement inside the while loop. Why is it able to assign and compare at the same time?