|
@ -7,18 +7,22 @@ The default arguments make it use `std::cout` and an empty string as input. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can also use a string as input: |
|
|
You can also use a string as input: |
|
|
|
|
|
|
|
|
brainfuck(",[.,]", "input"); |
|
|
brainfuck(",[.,]", "input"); |
|
|
|
|
|
|
|
|
Or with a stream/container/iterator: |
|
|
Or with a stream/container/iterator: |
|
|
|
|
|
|
|
|
brainfuck(",[.,]", std::input_iterator<char>(std::cin)); |
|
|
brainfuck(",[.,]", std::input_iterator<char>(std::cin)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can specify the memory-units: |
|
|
You can specify the memory-units: |
|
|
|
|
|
|
|
|
brainfuck<int>("..."); |
|
|
brainfuck<int>("..."); |
|
|
As long as the type has certain operators. The default output is comma-seperated, except for char. |
|
|
As long as the type has certain operators. The default output is comma-seperated, except for char. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can specify an output-iterator: |
|
|
You can specify an output-iterator: |
|
|
|
|
|
|
|
|
brainfuck("...", "", std::back_inserter(my_vector)); |
|
|
brainfuck("...", "", std::back_inserter(my_vector)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|