Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void printf(const std::function<void(char)> &putc, const char *format, ...);
- void printSomething()
- {
- char buffer[128];
- int idx = 0;
- printf([&idx](char c) { buffer[idx++] = c; }, "Hello %s\n", "World");
- }
Advertisement
Add Comment
Please, Sign In to add comment