From 52d8787bc44be54ce96e642998014ae481d234b7 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Sat, 13 Aug 2022 19:02:27 +0100 Subject: [PATCH] Test undefined return. --- main.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index 0fac5f7..36cb371 100644 --- a/main.cpp +++ b/main.cpp @@ -1,15 +1,11 @@ #include -void test(int*); -int num{ 0 }; +int test(); int main() { - test(&num); - return 0; + std::cout << test(); } -void test(int* execNum) { - std::cout << ++(*execNum) << "."; - test(execNum); +int test() { }