in C++ version, it seems pretty straightforward what this problem want us to do
int read(char *buf, int n) is asking us to read n byte FROM
However, when i check the Java version, it is indicating otherwise,
public int read(char buf, int n) requires us to read n char TO char buf, like this java solution indicates
Am I getting it right?
"int read(char *buf, int n) is asking us to read n byte FROM char *buf"
Not really. Just like the Java API, you need to read n bytes (from a file) TO char *buf. You don't need to worry about which file to read these bytes from, because read4 knows all the low-level details of reading.