hi
got a little prob with data types.
I´m reading data from a socket in to a unsigned char buf[4096]; .
Now, lets say there are 60Bytes written into the array( but it is
always different).
Now i want to give the bytes to a other class like:
pushControlPacket(buf);
but i only want to give the recieved data, not the whole buffer (4096)
icluding the length of the recieved data.
should i cast the recieced data into a std::string and define the
function like this:
pushControlPacket(std::string);
or is there a way to define a function for variable chararrays like
this:
pushControlPacket(unsigned char[]);
it should be "call by value"
thankx