Shuguang Wei wrote:
 1 .How to set font colour for C++ code? for example: using different
 colors for key words, comments... 
	M-x customize-apropos-faces RET ^font-lock RET
 2. how can I set the .emacs file that let it knows the file is C++
file? 
Files with any of the extensions:
	C H cc hh cpp hpp cxx hxx c++ h++
should be treated as C++ automatically. If you need to add other
extensions, see "C-h v auto-mode-alist".
-- 
Glynn Clements <glynn.clements(a)virgin.net>