ReadInt

This function reads an integer value from a stream.

Syntax

Returns

Returns an integer value read from the stream.

Example

#include "Leadwerks.h"

using namespace Leadwerks;

int main(int argc, const char *argv[])
{
std::string path = "MyFile.dat";

Stream* stream = FileSystem::WriteFile(path);
if (stream==NULL) Debug::Error("Failed to write file.");

stream->WriteInt(2);
stream->Seek(0);
System::Print(stream->ReadInt());

stream->Release();

return 0;
}