typedef logs_t(*logs_t)(char *);
logs_t logs(char *s) {
printf("%s", s);
fflush(0);
return &logs;
}
Error:
log.c:1:17: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef logs_t(*logs_t)(char *);
^
log.c:1:9: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef logs_t(*logs_t)(char *);
~~~~~~~ ^
log.c:1:15: fatal error: function cannot return function type 'int (char *)'
typedef logs_t(*logs_t)(char *);
^
2 warnings and 1 error generated.
What I want to achieve here is to chain the call to logs
:
logs("a")("b");