I want to read unsigned char from file and have search many different ways to execute. But I don't know the reason why they work or don't work.

1.
`ifstream input(ios::in | ios::binary) //seems to not work, but why?`

I have set the `ios::binary` which supposed to prevent the conversion.

2.
`unsigned char buffer[BUFFER_SIZE];`

`myfile.read((unsigned char *) buffer, BUFFER_SIZE);//error!fail`

`myfile.read((char *) buffer, BUFFER_SIZE);//work, the data type is unsigned char`

why do I have to convert it to `char*`?
The data stored in the array won't be converted to char not `unsigned char`?
What does it do during conversion?

3.
`vector`//it work but I don't know what it have done.