WhiteSpaces and Blank Lines

Home Forums C Programming WhiteSpaces and Blank Lines

This topic contains 1 reply, has 2 voices, and was last updated by  GWILouisaxwzkla 8 years, 1 month ago.

  • Author
    Posts
  • #2233

    GarnetHuynh
    Member

    Hi,

    Need help for a ‘C’ Code to ignore WhiteSpaces (Carriage Return, Enter, etc) and Blank Lines while reading an input file.

    Thanks,
    Marconi.

  • #3615

    I’m not sure what compiler your using but the include file ctype.h has a macro called isspace() that can be called on characters , like:

    The definition is listed as

    The isspace() function returns non-zero if its argument is some sort of space (i.e. single space, tab, vertical tab, form feed, carriage return, or newline). Otherwise, zero is returned.

    from http://www.cppreference.com/wiki/c/string/isspace

You must be logged in to reply to this topic.

0 Shares
Share
+1
Tweet
Share
Stumble