【发布时间】:2011-06-11 13:57:07
【问题描述】:
我正在尝试使用 lseek 以相反的顺序从文件中读取字符。
到目前为止,我有:
int finished = 1;
char temp[1];
while (finished > 0) {
lseek(fileID,0,2);
finished = read(fileID, &temp, 1);
cout << temp[0];
}
但读取总是返回 0。
有什么想法吗?
【问题讨论】:
标签: c++ unix system-calls