digitalmars.D.learn - How to define struct with function pointer member ?
- Gabi (11/11) Jul 28 2013 I tried:
- Gabi (3/14) Jul 28 2013 Sorry I found the answer.
- H. S. Teoh (7/13) Jul 28 2013 [...]
- Gabi (2/13) Jul 28 2013 Yes thanks. Beginner's mistake :)
I tried: struct X { .. function double(Individual) someFun; .. } But get: Error: Declaration expected, not 'function' Thanks, Gabi
Jul 28 2013
On Sunday, 28 July 2013 at 22:04:57 UTC, Gabi wrote:I tried: struct X { .. function double(Individual) someFun; .. } But get: Error: Declaration expected, not 'function' Thanks, GabiSorry I found the answer. Should have declared double function(...) someFun;
Jul 28 2013
On Mon, Jul 29, 2013 at 12:04:55AM +0200, Gabi wrote:I tried: struct X { .. function double(Individual) someFun;[...] The correct syntax is: double function(Individual) someFun; T -- Music critic: "That's an imitation fugue!"
Jul 28 2013
On Sunday, 28 July 2013 at 22:13:13 UTC, H. S. Teoh wrote:On Mon, Jul 29, 2013 at 12:04:55AM +0200, Gabi wrote:Yes thanks. Beginner's mistake :)I tried: struct X { .. function double(Individual) someFun;[...] The correct syntax is: double function(Individual) someFun; T
Jul 28 2013