DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Reading a file.

  1. #1
    Brant Guest

    Reading a file.


    I have to input a .txt file that has a paragraph containing words numbers.
    I need to input the file character by character. I must place the words
    of the paragraph in one array and the digits into another. I am having trouble
    reading the file and placing them in their arrays. Can Anyone help?

  2. #2
    Orrin Guest

    Re: Reading a file.


    use ifstream to read in each character then 'isalpha' to test if its a char
    or not. Give 'isdigit' a try also.

    O


    "Brant" <b_fuhrer@hotmail.com> wrote:
    >
    >I have to input a .txt file that has a paragraph containing words numbers.
    > I need to input the file character by character. I must place the words
    >of the paragraph in one array and the digits into another. I am having

    trouble
    >reading the file and placing them in their arrays. Can Anyone help?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center