ReadFloat

This function reads a float value from a stream.

Syntax

Returns

Returns a float 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->WriteFloat(2);

stream->Release();

stream = FileSystem::ReadFile(path);
if (stream==NULL) Debug::Error("Failed to read file.");

System::Print(stream->ReadFloat());

stream->Release();

return 0;
}