1
0

Test stack overflow.

This commit is contained in:
Captain ALM 2022-08-13 00:34:25 +01:00
parent d38494a62f
commit 7490abcfbb
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1

View File

@ -1,14 +1,15 @@
#include <iostream>
void test(int*);
int num{ 0 };
int main()
{
int i1{ };
int i2{ };
std::cout << "Enter a Integer: ";
std::cin >> i1;
std::cout << "Enter another Integer: ";
std::cin >> i2;
std::cout << i1 << " + " << i2 << " is " << i1 + i2 << "\n";
std::cout << i1 << " - " << i2 << " is " << i1 - i2 << "\n";
test(&num);
return 0;
}
void test(int* execNum) {
std::cout << ++(*execNum) << ".";
test(execNum);
}