sunnuntai 13. syyskuuta 2009

C++ Kana #1 — Usable Logging

Let's exercise RAII and streaming. Write function line() that allows you to write

line() << "hello world " << 5 << "!";

transforming to

std::cout << "hello world 5!" << std::endl;

Ei kommentteja: