Last active
August 29, 2015 14:03
-
-
Save FlyingJester/0913367a9c7460f6b432 to your computer and use it in GitHub Desktop.
Hello World example using T5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <t5.h> | |
| #include <cstdio> | |
| int main(int argc, char *argv[]){ | |
| // Create a data source that uses a C file handle. | |
| t5::DataSource *OutSource = t5::DataSource::FromCFileHandle(stdout); | |
| // Create a chained data source that can only write. | |
| t5::DataSourcePusher *StdOut = OutSource->AsPusher(); | |
| StdOut->WriteS("Hello, world!\n"); | |
| delete StdOut; | |
| delete OutSource; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment