Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cm-jones committed Jul 24, 2024
1 parent cf20ae2 commit e9f2823
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,12 @@ To use libdsc in your C project, follow these steps:
}
for (size_t i = 0; i < 100; ++i) {
if (!dsc_set_insert(set, i)) {
DSCError errno = dsc_error_get(set);
DSCError errno;
if ((errno = dsc_set_insert(set, i)) != DSC_ERROR_OK) {
// Handle error code ...
}
}
dsc_set_insert(set, 0); // Returns false
dsc_set_contains(set, 99); // Returns true
dsc_set_erase(set, 53); // Returns true
int size = dsc_set_size(set); // Returns 99
// Use other set functions as needed ...
dsc_set_deinit(set);
Expand Down

0 comments on commit e9f2823

Please sign in to comment.