Puzzle 23 | Off to a Good Start |
| #include <iostream> |
| |
| struct Logger {}; |
| struct Configuration {}; |
| |
| Logger initializeLogger() |
| { |
| std::cout << "Initializing logger\n"; |
| return Logger{}; |
| } |
| |
| Configuration readConfiguration() |
| { |
| std::cout << "Reading configuration\n"; |
| return Configuration{}; |
| } |
| |
| void startProgram(Logger logger, Configuration configuration) |
| { |
| std::cout << "Starting program\n"; |
| } |
| |
| int main() |
| { |
| startProgram(initializeLogger(), readConfiguration()); |
| } |
Guess the Output | |
---|---|
Try to guess what the output is before moving to the next page. |
The program has unspecified ...
Get C++ Brain Teasers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.