In general there is no answer what is better. Without other code that is, more precisely without whole project design it is difficult to say what will be better.
For example, the first function design could be used as some more general wrapper for new. The second function design could be used as general initializer of your data structures.
Only I do not understand if in the second function you already know how many characters will be used then why do you return number of characters?
> it's better return a pointer or passing the pointer as an argument?
Neither is a very good option. Consider using a vector<> instead:
1 2 3 4 5 6 7
//only at this time I know the number of bytes to allocate. Ex 5 bytes
std::vector<unsignedchar> buffer(5) ;
return buffer ;
from the calling method:
1 2 3 4
std::vector<unsignedchar> buffer = process() ;
unsignedchar* mybuffer = &buffer.front() ; // if required, preferably use the vector directly
// using mybuffer...
// destructor of buffer will release the memory