Printf needs #include <cstdio>

In http://gnuradio.org/trac/changeset/11583 there are some files that
use printf. With gcc-4.4 (on Fedora 11) these fail to compile unless you
add #include .

Before I look at fixing this by adding the include, is it “better” to
fix by using iostream classes to replace the printf’s? Do the gnuradio
radio developers prefer one over the other?

Philip

On Mon, Aug 17, 2009 at 02:39:23PM -0400, Philip B. wrote:

In http://gnuradio.org/trac/changeset/11583 there are some files that
use printf. With gcc-4.4 (on Fedora 11) these fail to compile unless you
add #include .

Thanks.

Before I look at fixing this by adding the include, is it “better” to
fix by using iostream classes to replace the printf’s? Do the gnuradio
radio developers prefer one over the other?

I think either is fine. Sometimes printf is easier to use when you
want formatted output. Sometime std::cout << myobject is easier.

Please add the missing cstdio and commit it.

Eric