We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 092ee1a commit 86818bdCopy full SHA for 86818bd
sample/CMakeLists.txt
@@ -1,4 +1,4 @@
1
-set(SAMPLE_TARGETS basic_usage pcg-demo codebook cppref-sample make-partytrick)
+set(SAMPLE_TARGETS basic_usage pcg-demo codebook cppref-sample make-partytrick check-output)
2
3
foreach(sample ${SAMPLE_TARGETS})
4
add_executable(${sample} ${sample}.cpp)
sample/check-output.cpp
@@ -0,0 +1,12 @@
+#include <iostream>
+#include <iomanip>
+#include "pcg_random.hpp"
+
5
+int main() {
6
+ pcg32 rng(42u); // Seed with 42
7
+ std::cout << "First 10 random numbers from pcg32(42):" << std::endl;
8
+ for(int i=0; i<10; ++i) {
9
+ std::cout << std::setw(12) << rng() << ((i+1)%5 == 0 ? "\n" : " ");
10
+ }
11
+ return 0;
12
+}
0 commit comments