C style function pointers

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 26 05:35:01 PDT 2014


On Tue, 26 Aug 2014 12:26:43 +0000
nikki via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com> wrote:

> this errors witha : Error: function test.lineair_interpolation
> (float p) is not callable using argument types (), but I don't
> really know where to go from here.
you need to use '&' to get function pointer. i.e.

  writeln(interpolate(100,100,10, &lineair_interpolation));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140826/1bde0e4b/attachment-0001.sig>


More information about the Digitalmars-d-learn mailing list