1

I am getting VC++ 2010 C2061 error on line:

#include "queryevaluator_p.h" class QueryEvaluator { public: vector<AttrValue>* getCandidateList(QueryClause cl, int pos, ResultSet *computedRes); ... 

Error 41 error C2061: syntax error : identifier 'ResultSet' h:\dropbox\sch\cs3202\code\source\includes\queryevaluator.h 40

ResultSet is a struct defined in "queryevaluator_p.h"

struct ResultSet{ //a set of result bool valid; vector<ResultRow> rows; }; 

Whats wrong here? ResultSet can be used elsewhere

1 Answer 1

2

Maybe you have circular includes (queryevaluator_p.h includes the main header again) causing confusion. Depending on the exact setup this can lead to such an effect, because one of the files will have to be compiled first.

The solution would be to resolve the circular dependency by using a forward declaration instead of an include in one place. For example you could forward declare struct ResultSet instead of including the queryevaluator_p.h header.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.