A byte will recieve 2 hex digits at most, and a 32-bit integer
(4 bytes), 8 of them. Anyway, the bytes will look the same. In fact, here's an example (sorta):
Code:
char * new_imbedded(int size){
int si = sizeof(int);
char * buffer = new char[size + si];
if(buffer == 0)
return NULL;
memcpy( buffer, &size, si );
return buffer+si;
}
int imbed_length(char * s){
int size;
int si = sizeof(int);
s -= si;
memcpy(&size, s, si);
return size;
}
int main(){
char * string = new_imbedded(256);
cout << imbed_length(string) << endl;
cin.get();
delete [] string;
return 0;
};
Point is, a byte is a byte is a byte...( usually, at least )