Skip to content

Instantly share code, notes, and snippets.

@FlyingJester
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save FlyingJester/0913367a9c7460f6b432 to your computer and use it in GitHub Desktop.

Select an option

Save FlyingJester/0913367a9c7460f6b432 to your computer and use it in GitHub Desktop.
Hello World example using T5
#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