Update demo program
This commit is contained in:
parent
8874e7911b
commit
84b7a9af35
@ -9,42 +9,27 @@ void trace() {
|
|||||||
cpptrace::print_trace();
|
cpptrace::print_trace();
|
||||||
}
|
}
|
||||||
|
|
||||||
int x;
|
|
||||||
|
|
||||||
void foo(int n) {
|
void foo(int n) {
|
||||||
if(n == 0) {
|
if(n == 0) {
|
||||||
x = 0;
|
|
||||||
trace();
|
trace();
|
||||||
x = 0;
|
|
||||||
} else {
|
} else {
|
||||||
x = 0;
|
|
||||||
foo(n - 1);
|
foo(n - 1);
|
||||||
x = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
void foo(int x, Args... args) {
|
void foo(int x, Args... args) {
|
||||||
x = 0;
|
|
||||||
foo(args...);
|
foo(args...);
|
||||||
x = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void function_two(int, float) {
|
void function_two(int, float) {
|
||||||
x = 0;
|
|
||||||
foo(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
|
foo(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
|
||||||
x = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void function_one(int) {
|
void function_one(int) {
|
||||||
x = 0;
|
|
||||||
function_two(0, 0);
|
function_two(0, 0);
|
||||||
x = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
x = 0;
|
|
||||||
function_one(0);
|
function_one(0);
|
||||||
x = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user