Guest User

Untitled

a guest
Oct 26th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1.  
  2. void printf(const std::function<void(char)> &putc, const char *format, ...);
  3.  
  4. void printSomething()
  5. {
  6.     char buffer[128];
  7.     int idx = 0;
  8.     printf([&idx](char c) { buffer[idx++] = c; }, "Hello %s\n", "World");
  9. }
Advertisement
Add Comment
Please, Sign In to add comment