Ok Figured it out. Actually the ccDrawXXX functions only work in the draw method of the layer! I was trying to it in init method of the layer.
So to get this working you need to add a
function to your .h file for the layer and in the .cpp file do something like this:
ccDrawColor4B(0, 0, 0, 255);
Hope it helps someone!