Thread: white spaces ...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    5

    white spaces ...

    I'm doing a program where I send a string to a file, and I want to read it back, but when I do that, the white spaces only come up as nothings .... all the words are cascaded together , for example

    write to the file: "This is a test!"
    I get from it: "Thisisatest!"

    anyone know how to overcome this??

    I obviously tried to use an if statement which tested for white spaces. Also, the file itself has the spaces in it, so why doesn't the reading function include them?
    Last edited by eagles; 01-13-2006 at 07:18 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading white spaces? oh and scanf_s
    By RobotGymnast in forum C++ Programming
    Replies: 7
    Last Post: 11-01-2008, 05:32 AM
  2. Replies: 1
    Last Post: 03-08-2005, 12:02 PM
  3. white spaces
    By Jules in forum C++ Programming
    Replies: 2
    Last Post: 04-24-2004, 02:55 PM
  4. string input...with white spaces?
    By Pureghetto in forum C Programming
    Replies: 6
    Last Post: 03-10-2003, 01:52 PM
  5. Reading in text file into an array, white spaces...
    By error in forum C++ Programming
    Replies: 12
    Last Post: 01-14-2003, 09:39 AM