Thread: reading

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    53

    reading

    how do you check the thing you read in from file is int or char?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I assume you mean a digit or an alphabetic character. Try looking at the functions provided by the ctype.h header. Specifically isalpha and isdigit. Otherwise, clarify your question.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 07:27 AM
  2. Resetting a ifstream object after reading the whole file
    By Zeeshan in forum C++ Programming
    Replies: 5
    Last Post: 03-31-2008, 08:03 AM
  3. Replies: 2
    Last Post: 01-28-2008, 03:07 AM
  4. help with reading from stream
    By movl0x1 in forum C Programming
    Replies: 7
    Last Post: 05-31-2007, 10:36 PM
  5. problems reading data into an array and printing output
    By serino78 in forum C Programming
    Replies: 4
    Last Post: 04-28-2003, 08:39 AM