Collection of C++ snippets
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Joshua Moerman (@Kassalade) 093e50fa3f markdown jeej 14 years ago
..
README.md markdown jeej 14 years ago
brainfuck.hpp brainfucklib, made with irc-use (geordi-irc) in mind 14 years ago
main.cpp brainfucklib, made with irc-use (geordi-irc) in mind 14 years ago

README.md

Usage:

brainfuck("++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.");

The default arguments make it use std::cout and an empty string as input.

You can also use a string as input: brainfuck(",[.,]", "input");

Or with a stream/container/iterator: brainfuck(",[.,]", std::input_iterator(std::cin));

You can specify the memory-units: brainfuck("..."); As long as the type has certain operators. The default output is comma-seperated, except for char.

You can specify an output-iterator: brainfuck("...", "", std::back_inserter(my_vector));

It has a lot of defaultparameters, because it's intended use was on an irc-channel.