April 2020
Intermediate to advanced
412 pages
9h 58m
English
We are going to create an application that uses the power of the C++ standard library algorithms to generate and process fixed data frames without using dynamic memory allocation:
#include <algorithm>#include <array>#include <iostream>#include <random>using DataFrame = std::array<uint32_t, 8>;
void GenerateData(DataFrame& frame) { std::random_device rd; std::generate(frame.begin(), frame.end(), [&rd]() { return rd() % 100; });}