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

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -