From bec90eeec483f4fd685bb28758cdf55897bc0b3e Mon Sep 17 00:00:00 2001 From: Oskar Date: Thu, 15 Aug 2024 17:26:06 +0200 Subject: more exercises and tests --- 3p42.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 3p42.cpp (limited to '3p42.cpp') diff --git a/3p42.cpp b/3p42.cpp new file mode 100644 index 0000000..495a6f6 --- /dev/null +++ b/3p42.cpp @@ -0,0 +1,30 @@ +#include +#include +#include "sales_data.hpp" +#include "sales_item.hpp" +#include + +/* + * + * 3.42 + * + * + */ + +int main () { + + std::vector va = {23,432423,43253,123,787,45677,3345,657784,3453,10}; + int arr[10]; // Really annoying that there is no way to take the size of the vector and use it as the size of this array. + int i = 0; + for(auto a : va) { + arr[i] = a; + ++i; + } + + for(auto a : arr) { + std::cout << a << " "; + } + + std::cout << std::endl; + return 0; +} -- cgit v1.2.3