Liste des Groupes | Revenir à c theory |
On 12/03/2025 09:49, Mikko wrote:Error corrected.On 2025-03-11 18:23:24 +0000, Richard Heathfield said:Good spot, but no, it's fine. The bug is elsewhere. That line should read:
int rhc(unsigned int i)The return instruction has wrong type.
{
typedef int(*pf)(unsigned int);
pf arr[3] = {rha, rhb, rhc};
return arr[i % 3];
return arr[i % 3](i);
arr is of type int(*)(unsigned int)[3]--
arr[i % 3] is of type int(*)(unsigned int)
arr[i % 3](i) is a function call returning int
Les messages affichés proviennent d'usenet.