how to categrise pictures according to picture colour and texture using c++???

You will need some libraries to do the job. I think you will find some free libraries, just try to google. I will try to find if I have some time.

I am not sure, because i have never worked with images but for image manipulating you have to use librarys(writing your own would be pointless and hard ass task). Have a look at libpng and cimg. I don't know if you can do what you want with those but you can try.

The library you are looking for is OpenCV (Open Computer Vision Library). It is used extensively in artificial intelligence / robotics applications for image processing tasks.