mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-11 09:36:37 +00:00
19 lines
428 B
C++
19 lines
428 B
C++
#include "../servers/file_stream.hpp"
|
|
#include <iostream>
|
|
|
|
using namespace Mangle::Stream;
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
StreamPtr inp(new FileStream("file_server_test.cpp"));
|
|
|
|
char buf[21];
|
|
buf[20] = 0;
|
|
cout << "pos=" << inp->tell() << " eof=" << inp->eof() << endl;
|
|
inp->read(buf, 20);
|
|
cout << "First 20 bytes: " << buf << endl;
|
|
cout << "pos=" << inp->tell() << " eof=" << inp->eof() << endl;
|
|
return 0;
|
|
}
|