From f8b740c5b083cbb2d755b8d1adb7dea41563c9ac Mon Sep 17 00:00:00 2001 From: Oskar Date: Mon, 16 Sep 2024 18:10:18 +0200 Subject: more --- 6p54.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 6p54.cpp (limited to '6p54.cpp') diff --git a/6p54.cpp b/6p54.cpp new file mode 100644 index 0000000..f78885d --- /dev/null +++ b/6p54.cpp @@ -0,0 +1,25 @@ +#include +#include + +/* + * + * 6.54 + * + * + */ + +int summing(int a, int b) { + + return a+b; +} + +int main () { + + int (*fpfp)(int, int) = summing; + int (*fpfp1)(int, int) = summing; + int (*fpfp2)(int, int) = summing; + int (*fpfp3)(int, int) = summing; + std::cout << fpfp(1, 1) << std::endl; + std::vector funcvec = {fpfp, fpfp1, fpfp2, fpfp3}; + return 0; +} -- cgit v1.2.3