: chop LF
the problem is foo is end in LF ( 0A ), and it will let a.out
get wrong output. if i run
#a.out
and input data from keybord, then end it by ctrl+D, will get the
right answer.
i'm not sure, if i understand you right ... you are having trouble to
detect the end of file, when
hello everybody
i wrote a program a.out. it get input from stdin, so i can use
pipe or redirection to get data from file. such as
# cat foo|a.out
the problem is foo is end in LF ( 0A ), and it will let a.out
get wrong output. if i run
#a.out
and input data from keybord, then end it by ctrl+D,
the problem is foo is end in LF ( 0A ), and it will let a.out
get wrong output. if i run
#a.out
and input data from keybord, then end it by ctrl+D, will get the
right answer.
i'm not sure, if i understand you right ... you are having trouble to
detect the end of file, when there is an
3 matches
Mail list logo