is that possible?
Jonathan Wakely
jwakely.gcc@gmail.com
Tue Sep 6 13:30:00 GMT 2011
On 6 September 2011 14:23, Leonardo wrote:
> hello all,
>
> is the construction bellow valid in ansi C?
Yes, but this isn't a question about GCC, so would be more suitable on
a general C programming list, newsgroup or forum.
Using typedefs makes the syntax much easier:
typedef void (*func1_type)(const char*, int);
typedef func1_type (*func2_type)(const char*, int);
void func1(const char* s, int i) { }
func1_type func2(const char* s, int i) { return &func1; }
func2_type func3(const char* s, int i) { return &func2; }
int main()
{
func3("a",1)("b",2)("c",3);
}
More information about the Gcc-help
mailing list