Monthly Archives: November 2007

Function Pointers

Declaring function pointers in C\C++ has a somewhat strange syntax, specially when you want to specify a function pointer as the return type of another function. so here is a brief explanation: To declare a pointer to an int called pNumber: int *pNumber; To declare a pointer to a function called pFunc (that has a [...]

Mr. Compiler, would you please inline this function?

I’ve always read that marking a function inline doesn’t guarantee that the compiler will actually inline it, but it’s merely a hint to the compiler to “try its best” to do it. Which have always raised the question in my head, how do I know if Mr. Compiler agreed to inline my function? Do I [...]

Installing nVidia drivers on debian linux

Since I forget the steps every single time I try to install or upgrade linux I’ll write them down. download the drivers from www.nvidia.com (usually a file with .run extension) download the kernel header files — apt-get install linux-headers-$(uname -r) execute the command — sh path to the nvidia driver here There is another method [...]