TU-Programmieren_2/lab3/taskC.cpp
2025-04-09 10:22:44 +02:00

27 lines
623 B
C++

/// @file
/// @brief task C
/// g++ -g -std=c++20 taskC.cpp -o taskC && ./taskC
#include "taskC.one.hpp" // regular functions: one::add, one::sum
#include "taskC.two.hpp" // todo: implement function templates two::add, two::sum
int main() {
using namespace one; // todo: switch to namespace 'two' after implementing the function templates, details see taskC.two.hpp
int x = 5;
int y = 6;
double u = 1.2;
double v = 3.3;
int z = add(x, y);
double w = add(u, v);
std::vector<int> xV = {1, 2, 3};
std::vector<double> yV = {5.1, 4.9, 10.0};
int sumI = sum(xV);
double sumD = sum(yV);
return 0;
}