Kevin
2005-04-14 23:17:42 UTC
Just to make sure I have implemented right the istream:
1)
input = "abckda3434klj-" should create the number "3434" and set flag for
fail bit istream = "abckdaklj-"
or
since we read a non-integer just set the fail bit and exit: istream =
"abckda3434klj-"
2)
input = "a-kdfjk34kj45" should create the number "-3445" and set fail bit
istream = "akdfjkkj"
or
again, just set the fail bit and exit: istream ="a-kdfjk34kj45"
3)
input = "abcdefghijk" should set fail bit
number = 0
or
number not modified
1)
input = "abckda3434klj-" should create the number "3434" and set flag for
fail bit istream = "abckdaklj-"
or
since we read a non-integer just set the fail bit and exit: istream =
"abckda3434klj-"
2)
input = "a-kdfjk34kj45" should create the number "-3445" and set fail bit
istream = "akdfjkkj"
or
again, just set the fail bit and exit: istream ="a-kdfjk34kj45"
3)
input = "abcdefghijk" should set fail bit
number = 0
or
number not modified