Results 1 to 2 of 2

Thread: How to read text file including all empty spaces..

  1. #1
    Join Date
    Jul 2009
    Posts
    49
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to read text file including all empty spaces..

    Hai

    My input file is like that
    Qt Code:
    1. AAA12 8.00 NZ 164 200 27-feb-2009 23:17:22 (KK) Testing
    2. test : mmp msm cvc1 cvc2 cvc3 cvc4 cvc5 cvc6 cvc7 cvc8
    3. n001 k091 0g10 9.22 0000 0000 0000 0000 0.83 0000
    To copy to clipboard, switch view to plain text mode 

    I want to read the file with all spaces and stored in a separate variables .

    I tried with ReadAll() and ReadLine () fns. but unable to spilt the string with spaces.

    How to do?

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to read text file including all empty spaces..

    are you sure that in this file spaces are used?
    maybe tabs are used instead if spaces?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Replies: 1
    Last Post: 3rd September 2008, 14:16
  2. Text file to PDF convertion using C++ code
    By joseph in forum General Discussion
    Replies: 2
    Last Post: 21st August 2008, 01:28
  3. [Java] read and write a file
    By mickey in forum General Programming
    Replies: 3
    Last Post: 22nd June 2008, 10:43
  4. Read binary file and convert to QString
    By jaca in forum Qt Programming
    Replies: 12
    Last Post: 13th June 2008, 23:05
  5. How to read text only as it is from file
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2007, 08:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.