Kubuntu Jaunty 9.04 Hangs desktop not responding

After I upgraded to Kubuntu Jaunty, I experienced a random hangs or crash, I can move my mouse, but nothing respond if I click. It seems to be the problem of the intel driver. I followed the instruction given here, and adding UXA in xorg.conf helps to solve my problem:
http://ubuntuforums.org/showthread.php?p=7293212#post7293212

undefined reference to `vtable for

I got this error when I compile a class:
undefined reference to `vtable for Device’
it turns out that GCC requires every virtual function to be defined, so I need to add an inline {} just to satisfy this.
virtual void setGridSpc(double a){};
instead of
virtual void setGridSpc(double a);

Maintaining C++ Codes

Some Ground rules:
1. Keep class data members private.
2. About global name space:
- Avoid data with external linkage at file scope: put all global variables in a structure, class, namespace, etc. This is to avoid name collison.
- Avoid free functions at file scope in .h files, avoid free functions with external linkage in .c files.
- Avoid [...]

Global Constants in C++

Declaring the global constants can polute the names available and create conflicts as the project grow larger. One solution is to declare it using a namespace.
globalconst.h
namespace GlobalConst{
const double PI=3.14;
};
and in your file, simply use
GlobalConst::PI
UPDATE: I have corrected the code, thanks