Yea this *is* good c++ code. We used this for an Image class and it is very very useful... PS: Shourya...your name sounds familiar...do we both know one Mr. Vijayan?... Soj -- Sojan James National Semi. India Designs Ltd. 7/6 Brunton Road, Bangalore 560025. India. Ph: 5587918/919/920 ext. 308