PDA

View Full Version : In QT Creator iostream - no such file or directory



macs_reach
15th January 2016, 05:22
Hi,
I have did a simple program in QT Creator3.4.2 (Macbook El Capitan).
The line "#include <iostream>" was under lined and says no such file or directory...

How to resolve this issue ?

Regards
Mac

Alex22
15th January 2016, 05:57
hi,
You could use #include <QDebug> instead of #include <iostream>

for example:
int a = 4;
qDebug() << a; //this does "cout" working

then you can see result in the "Application Output" tab (below row in the qt creator)

ChrisW67
17th January 2016, 00:15
The line "#include <iostream>" was under lined and says no such file or directory...

Does it compile? If it compiles then this is likely just a syntax highlighting glitch that may be remedied by updating Qt Creator. If it does not compile then the issue is with the state of your C++ tool chain, e.g. the file does not actually exist for the syntax highlighter to read.