hi Mike,
> class MyClass {
> typedef int (*happy)(int a, int b, int c);
>
> happy foo
> happy bar;
> happy baz;
> }
>
> Is there a way to define foo, bar, and baz with the same typedef in the c++
> file or do I have to enumerate all the arguments for the function definition
> à la
>
> int baz (int a, int b, int c) { return a + b + c; }
no. foo, bar and baz are _defined_ in the header as pointers to
function (and not declared as functions of given signature).
you can use them like
int lily (int i, int n, int t)
{
return i + n * t;
}
struct pond
{
static int lily (int i, int n, int t) { return i *n + t; }
};
foo = &lily;
bar = &pond::lily;
baz = foo;
p
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel