I don’t like to use <iostream> in C++ Library. I prefer to use something that is similar to “printf” and “scanf” in <stdio.h>.
Can I use Boost’s format library to replace <iostream> in all my C++ program ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Boost Format only does the formatting bit. You still need iostream to actually make something appear on the screen.
Of course, using them together will achieve the parity with
printfyou are looking for. And it does so without sacrificing type-safety (though that’s not a huge issue these days, since the compiler will usually warn about bad printf arguments).