I had included algorithm without .h maybe that was why random_shuffle didn’t work? I was getting some weird errors anyways. But my code above solved the issue. I just think it would be logical for a shuffle function to be added to the Vector class.
cocos2d::Vector only works with cocos2d:s classes as it does some bookkeeping with reference counting. For example this code compiles and links fine (as long as you #include <algorithm> ):