f가 f_pointer_type의 배열을 가리키고 싶습니다. 그래서 나는 무엇을 여기에서 놓쳤 느냐? 나는 '과제의 왼쪽 피연산자로 필요한 lvalue'오류가 나타납니다. 무슨 뜻이에요 ? 당신에 대해 읽으면함수에 대한 포인터 배열에 대한 포인터
#include <stdio.h>
typedef char* (*f_pointer_type)();
char * retHello()
{
return "hello";
}
int main()
{
char (* (*f())[])(); //Declare f to be a pointer to an array of pointers to function that gets nothing and return a char.
f_pointer_type funcs[3]; //an array of pointers to function that gets nothing and returns a pointer to char
f = &funcs; //ERROR : lvalue required as left operand of assignment
return 0;
}
을 가지고 함수에 대한 포인터이다? f_pointer_type ** f; - –
f가 frazy function forward declaration으로 해석 된 것 같습니다. –