I am trying to assign a function to a function pointer, but I am getting the following error:
lvalue required as left operand of assignment.
My code is the following:
#include <stdio.h>
void intr_handler(int param){
printf("Hey there!\n");
}
int main(){
void *(intr_handlerptr)(int);
intr_handlerptr = intr_handler;
}
I cannot see what is the problem there, since I am assigning to the pointer "intr_handlerptr" the function "intr_handler" and they have the same signature. What am I missing?