Test stack overflow.
This commit is contained in:
parent
d38494a62f
commit
7490abcfbb
17
main.cpp
17
main.cpp
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user