Skip to content

Commit 88705b6

Browse files
committed
Updating the README example.
1 parent 5970251 commit 88705b6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The implementation does not throw and does not allocate memory (e.g., with `new`
3535
Example:
3636

3737
``` C++
38-
#include "fast_float/parse_number.h"
38+
#include "fast_float/fast_float.h"
3939
#include <iostream>
4040

4141
int main() {
@@ -44,6 +44,7 @@ int main() {
4444
auto answer = fast_float::from_chars(input.data(), input.data()+input.size(), result);
4545
if(answer.ec != std::errc()) { std::cerr << "parsing failure\n"; return EXIT_FAILURE; }
4646
std::cout << "parsed the number " << result << std::endl;
47+
return EXIT_SUCCESS;
4748
}
4849
```
4950

tests/example_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ int main() {
88
auto answer = fast_float::from_chars(input.data(), input.data()+input.size(), result);
99
if(answer.ec != std::errc()) { std::cerr << "parsing failure\n"; return EXIT_FAILURE; }
1010
std::cout << "parsed the number " << result << std::endl;
11+
return EXIT_SUCCESS;
1112
}

0 commit comments

Comments
 (0)