#include <iostream>
using namespace std;
bool Testing() {
static int Variable = 0;
if (Variable == 1) return true;
else {
Variable = 1;
Testing();
}
return false;
}
int main()
{
if (Testing()) cout << "True";
else cout << "False";
}
Yukarıdaki fonksiyon kendi içerisinde tekrar çağırıldığında if (Variable == 1) kısmı true döndüğü halde içerisindeki return true; komutu çalışmıyor ve ardından gelen hiçbir komut çalışmıyor.