Main Page | Compound List | Compound Members | Examples

bufferfstream.cxx

This is an example of how to use TPT::Buffer with an input fstream.
// Example usage of TPT::Buffer class.

#include "mylex.h"

#include "libtpt/buffer.h"

int main()
{
    fstream mystream("myfile.txt");
    TPT::Buffer inbuf(mystream);
    char c;

    while (inbuf)
    {
        c = inbuf.getnextchar();
        lex(c);
    }

    return 0;
}

Generated on Sat Feb 7 16:06:07 2004 for LibTPT by doxygen 1.3.3