Wednesday, 15 August 2012

C function and struct on the fly -



C function and struct on the fly -

i know if t's possible in initialise struct on fly function phone call in c++ :

struct point { int x; int y; }; some_function(new point(x,y));

thx :)

yes. can utilize compound literals, introduced in c99.

some_function((struct pint) {5, 10});

c function struct on-the-fly

No comments:

Post a Comment