[Qt-creator] Cout not printing

Carter, Nathan NCARTER at bentley.edu
Thu Jul 22 17:18:04 CEST 2010


As an earlier responder said, this is not really a Qt Creator question.  The qt-interest list is for questions about Qt that are independent of Creator.

Nathan


On Jul 22, 2010, at 11:13 AM, Danny Price wrote:

That's fine for C++ but what about C? printf("test\n") doesn't work unless I follow it with flush(stdout).

I'm on OSX so the console config flag is not applicable.

On Thu, Jul 22, 2010 at 3:15 PM, Christian Kandeler <christian.kandeler at nokia.com<mailto:christian.kandeler at nokia.com>> wrote:
On 07/22/2010 04:11 PM, ext Jothy wrote:
> Hi all,
>
> I am trying to print a string with cout, but it's not printing at all!
>
> I have included #include<iostream>
>
> then
>
> cout<<"printing";
>
> But, nothing prints, while the application compiles and runs fine.

Not a Qt Creator problem.
You have to flush the output:
std::cout << "printing" << std::endl;


Christian
_______________________________________________
Qt-creator mailing list
Qt-creator at trolltech.com<mailto:Qt-creator at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-creator

<ATT00001..txt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100722/4f148013/attachment.html 


More information about the Qt-creator-old mailing list