Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

char (*(*x())[])()

Name: Anonymous 2012-01-28 18:16

"char (*(*x())[])()
x: function returning pointer to array[] of pointers to function returning char" - K&R, page 122.

Because C is concise and elegant.
Seriously, I am a fan of the language, but this is unforgivable.

Name: Anonymous 2012-01-28 18:29

>>6

well, it's meaning is very consistent. It's not like putting the int inside of operator++(int), which doesn't make any sense, other than for convenient parsing.

You got a function returning char?

char g();

Now an array of pointers to the thing that g's type is? substitute it in where the letter g is:

char (*h[])();

Now a pointer to the thing that h is? put a (*k) where h is:

char (*(*k)[])();

Now a function taking no arguments that returns the type that k is? put a f() where k is:

char (*(*f())[])();

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List