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

Should you dereference function pointers?

Name: Anonymous 2009-11-04 19:33

#include <stdio.h>

void func() {
  printf("hello world\n");
}

void (*go)() = func;

int main() {
  go();    // number 1...
  (*go)(); // or number 2
  return 0;
}


Which is correct ANSI C89? GCC accepts both, even in -ansi -pedantic; it outputs hello world twice.

Name: Anonymous 2009-11-06 11:23

>>24
At work we wrote our own deque which is contiguous
Am I correct to assume that your pop() works in linear time but you don't even know what that means because you are cool hackers who implement their own super-fast deque with direct element access and can't be bothered with abstract bullshite that makes stl so slow (not that you ever actually compared performance)?

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