I'm trying to learn C++ from the book Accelerated C++. When trying to compile the code below, which I believe to be an exact copy of the code in the book, I get the following error and I don't understand why. Also, I have no clue how to debug this error. Any pointers in that direction (problem-solving strategy for quickly debugging this type of error) would be much much appreciated. Thanks in advance! Here's the compiler error: 

```
g++ main.cpp split.cpp -o main
main.cpp: In function ‘void gen_aux(const Grammar&, const string&, std::vector<std::basic_string<char> >&)’:
main.cpp:64:41: error: no match for call to ‘(const std::vector<std::vector<std::basic_string<char> > >) ()’
make: *** [all] Error 1

```

The line at which the error occurs is the following:

```
const Rule_collection& c = it->second();

```

Complete code listing:

```
#include <cstdlib>
#include <iostream>
#include <map>
#include <stdexcept>
#include <string>
#include <vector>
#include "split.h"

using std::cin;
using std::cout;
using std::domain_error;
using std::endl;
using std::istream;
using std::logic_error;
using std::map;
using std::pair;
using std::string;
using std::vector;

typedef vector<string> Rule;
typedef vector<Rule> Rule_collection;
typedef map<string, Rule_collection> Grammar;   

int nrand(int n) {
    if (n <= 0 || n > RAND_MAX) {
        throw domain_error("Argument to nrand is out of range");
    }
    const int bucket_size = RAND_MAX / n;
    int r;
    do {
        r = rand() / bucket_size;
    } while (r >= n);

    return r;
}

bool bracketed(const string& s) {
    return s.length() > 0 && s[0] == '<' && s[s.length() - 1] == '>';
}

Grammar read_grammar(istream& in) {
    Grammar g;
    string line;
    while (getline(in, line)) {
        vector<string> words = split(line);
        if (!words.empty()){
            g[words[0]].push_back(Rule(words.begin() + 1, words.end()));
        } 
    }
    return g;
}

void gen_aux(const Grammar& g, const string& word, vector<string>& ret) {
    if (!bracketed(word)) {
        ret.push_back(word);
    }
    else {
        Grammar::const_iterator it = g.find(word);
        if (it == g.end()) {
            throw logic_error("empty rule");
        }
        const Rule_collection& c = it->second();
        const Rule& r = c[nrand(c.size())];
        for (Rule::const_iterator i = r.begin(); i != r.end(); i++) {
            gen_aux(g, *i, ret);
        }
    }
}

vector<string> gen_sentence(const Grammar& g) {
    vector<string> s;
    gen_aux(g, "<sentence>", s);
    return s;
}

int main() {
    vector<string> sentence = gen_sentence(read_grammar(cin));
    if (!sentence.empty()) {
        vector<string>::const_iterator it = sentence.begin();
        cout << *it;
        it++;
        while (it != sentence.end()) {
            cout << " " << *it;
            it++;
        }
        cout << endl;
    }
    return 0;
}

```