im not really familiar with the string class and i came across a "problem" on my code

how is it possible to copy an array of bytes (binary) from a char array to a string variable?
the char array holds the data of a file , when i try to copy to a string it only copies until the first null byte