Why does it give me the stack overflow error in VS(C++)?

using namespace std;
ifstream fin("date.in");
struct intrebare {char intrebare[256], raspuns[256]; };
struct capitol {
    char titlu_capitol[101];
    intrebare intrb[101];
int main() {
    capitol cptl[101];
    int nrCapitole; fin >> nrCapitole;
    for (int i = 1; i <= nrCapitole; i++) {
        fin.getline(cptl[i].titlu_capitol, 101);
    return 0;

Why does it give me an error saying stack overflow. I want to make a program where I have n chapters and at every chapter I have some questions and answers to them.

Read more here: Source link