Use ifstream and qDebug



  • Hello,

    I had to use ifstream and qDebug() in a QT program. I notice that in debug mode there is error generate when ue ifstream in Qt program. I saw on post that the solution to avoid that is not to use ifstream.

    I had to ue ifstream because it is used in a library I use.

    Is there a way to use ifstream and qDebug() at the same time?



  • @Xav12358 said in Use ifstream and qDebug:

    Is there a way to use ifstream and qDebug() at the same time?

    Yep, shouldn't be a problem

    I notice that in debug mode there is error generate when ue ifstream in Qt program.

    What error?



  • In fact I generated a library which use ifstream and cout. Then I use that library in Qt project.
    In windows, when I use that library (debug or release version) in my project in debug mode the ifstream read strange stuff. In release mode it works properly.



  • @Xav12358 said in Use ifstream and qDebug:

    strange stuff

    error C2065: 'strange stuff' : undeclared identifier


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.