Skip to content

Commit

Permalink
fixed error of 14.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
pezy committed Jun 29, 2017
1 parent 17f5838 commit f5625cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ch14/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ see [Exercise 14.2](#exercise-142).
- (b) 10 24.95 0-210-99999-9

- (a) correct format.
- (b) illegal input. But `0-210-99999-9` will be converted to a float stored in this object. As a result, the data inside will be a wrong one.
- (b) illegal input. But `.95` will be converted to a float stored in this object. As a result, the data inside will be a wrong one.

Output: `10 24 22.8 0.95`

check [Test](ex14_02_TEST.cpp)
check [Test](ex14_02_sales_data_test.cpp)

## Exercise 14.11

Expand Down
4 changes: 4 additions & 0 deletions ch14/ex14_02_sales_data_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ int main()
std::cin >> cp5;
std::cout << cp5 << std::endl;
}

// compile
// cc -g ex14_02_sales_data_test.cpp ex14_02_sales_data.cpp -std=c++11 -pedantic
// -Wall

0 comments on commit f5625cf

Please sign in to comment.