Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire authored Oct 8, 2023
1 parent 181da6f commit 0bca609
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ Linux or macOS users might follow the following instructions if they have a rece
```
2. Create a new file named `demo.c` with this content:
```C
#include <stdio.h>
#include <stdlib.h>
#include "roaring.c"
int main() {
#include <stdio.h>
#include <stdlib.h>
#include "roaring.c"
int main() {
roaring_bitmap_t *r1 = roaring_bitmap_create();
for (uint32_t i = 100; i < 1000; i++) roaring_bitmap_add(r1, i);
printf("cardinality = %d\n", (int) roaring_bitmap_get_cardinality(r1));
Expand All @@ -104,14 +104,14 @@ Linux or macOS users might follow the following instructions if they have a rece
printf("%zu \n", bitset_count(b));
bitset_free(b);
return EXIT_SUCCESS;
}
}
```
2. Create a new file named `demo.cpp` with this content:
```C++
#include <iostream>
#include "roaring.hh"
#include "roaring.c"
int main() {
#include <iostream>
#include "roaring.hh"
#include "roaring.c"
int main() {
roaring::Roaring r1;
for (uint32_t i = 100; i < 1000; i++) {
r1.add(i);
Expand All @@ -124,7 +124,7 @@ Linux or macOS users might follow the following instructions if they have a rece
}
std::cout << "cardinality = " << r2.cardinality() << std::endl;
return 0;
}
}
```
2. Compile
```
Expand Down

0 comments on commit 0bca609

Please sign in to comment.