如何将以下 Java 行转换为 C++ 代码?
FileInputStream fi = new FileInputStream(f);
byte[] b = new byte[188];
int i = 0;
while ((i = fi.read(b)) > -1)// This is the line that raises my question.
{
// Code Block
}
Run Code Online (Sandbox Code Playgroud)
我正在尝试运行以下代码行,但结果是错误。
ifstream InputStream;
unsigned char *byte = new unsigned char[188];
while(InputStream.get(byte) > -1)
{
// Code Block
}
Run Code Online (Sandbox Code Playgroud)