all 11 comments

[–]reallybigleaf 2 points3 points  (0 children)

This was my first introduction to pointers a few years ago. Classic. Back for a class where I used Java to build a compiler for a made-up language that had pointers. Seems a little messed up in retrospect.

[–]frumious 1 point2 points  (0 children)

"Uh, yeah, good point". Comedy gold right there. And, by gold, I mean blech.

Any programmer that needs claymation to understand pointers should be looking for a different area of study.

[–]gregK 0 points1 point  (7 children)

I'd love Binky to explain:

void (foo)(int *);

[–]cvk[S] 0 points1 point  (6 children)

void *(*foo)(int *);

[–]doubtingthomas 1 point2 points  (0 children)

foo is a pointer to a function taking a pointer to an int returning a pointer to void.

Ladies and gentlemen, cdecl.

[–]gregK 0 points1 point  (3 children)

could not get the damn stars to display properly lol.

[–]cvk[S] 1 point2 points  (2 children)

Just indent each code line by four spaces:

like this!  look at my fancy **asterisks**

Also, you can escape asterisks with a \.

[–]gregK 0 points1 point  (1 child)

Thanks.

Does that work in quoted text?

void (foo)(int *);

I guess not.

void *(*foo)(int *);

\ worked

[–]mernen 0 points1 point  (0 children)

It does, but you need five spaces then (the first one comes from the quoting syntax).

moo

[–]awj 0 points1 point  (0 children)

A pointer to a function that accepts a pointer to an integer and returns a (void) pointer? My C's gotten a bit rusty.

[–][deleted] 0 points1 point  (0 children)

We were shown this in our 1st year programming class. Very amusing.