appcrash fault

it gives appcrash problem after command promt window when i run it.
i use dev c++ 4.9.9.2





#include <iostream>
#include<string>
using namespace std;

void deneme()
{
string isim ;
deneme();
cout<<"isim gir " ;
cin>>isim;
cout<<"hosgeldin " << isim ;
}


int main()
{
int x;

deneme();

cin>>x;

}
main() calls deneme(), which calls deneme(), which calls deneme(), ... eventually the program runs out of stack memory causing a program crash.
and what is the solution. how can i fix it.. thank u
Why is deneme() calling deneme()?
i am new and trying to learn.
in this lesson trying to learn functions.
thank u "Why is deneme() calling deneme()?"
i understand...
Topic archived. No new replies allowed.