c++ - A problem with openning the file -
Hello I want to open the file in one place in my computer I use this code but it does not open it How can I open that file?
QString path = "C: \ Program Files (x86) \ vnb.txt"; QFile Infix (path); If (! InFile.open (QIODevice :: ReadOnly | QIODevice :: Text)) return -1;
anytime as \ as a file separator in QT Do not Always use / and the QT will ensure that it is always portable, it is clearly stated in this documentation.
Comments
Post a Comment