0

Here is the error im getting: ./Rule.h:17:12: error: use of undeclared identifier 'Predicate' vector preds;

Here is my code for Rule.h:


#ifndef RULE_H
#define RULE_H

#include <vector>
#include <string>
#include "Predicate.h"
#include "Token.h"
#include "Scanner.h"
#include "Param.h"
#include "DatalogProgram.h"
using namespace std;

class Rule{
private:
    vector<Predicate> preds;
    Predicate headPred;
 public:
    Rule();
    ~Rule();
    string toString();

};
#endif

I have no idea what is wrong, but I can almost guarantee is it something super small. If someone can help me fix this bug but also explain why it happened that would be great!

1

Maybe try <vector.h> and <string.h>? Note the missing .h

BTW, how is this related to CS50? I don't believe it's teaching c++

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .