1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
libprimesieve code examples
===========================
This directory contains examples programs that show how to generate primes
using libprimesieve.
C++ examples
------------
Ordered by importance.
* [store_primes_in_vector.cpp](cpp/store_primes_in_vector.cpp)
* [primesieve_iterator.cpp](cpp/primesieve_iterator.cpp)
* [previous_prime.cpp](cpp/previous_prime.cpp)
* [count_primes.cpp](cpp/count_primes.cpp)
* [More C++ examples](cpp/)
C examples
----------
Ordered by importance.
* [store_primes_in_array.c](c/store_primes_in_array.c)
* [primesieve_iterator.c](c/primesieve_iterator.c)
* [previous_prime.c](c/previous_prime.c)
* [count_primes.c](c/count_primes.c)
* [More C examples](c/)
Build instructions (Unix-like OSes)
-----------------------------------
Open a terminal and cd into the primesieve (parent) directory,
then run the commands:
```sh
./configure --enable-examples
make
```
Build instructions (Microsoft Visual C++)
-----------------------------------------
Open a Visual Studio Command Prompt and cd into the primesieve
(parent) directory, then run the commands:
```sh
nmake -f Makefile.msvc
nmake -f Makefile.msvc examples
```
|