From: Alamelu on
There are 2 projects, Project A and Project B. I want to include a header
file from Project B into project A. Project B is dependent on Project A.
When including the header file of project B into A, i get the below
mentioned error.

D:\AInterfaces.h(490): error C2143: syntax error : missing ';' before 'string'
D:\AInterfaces.h(490): fatal error C1075: end of file found before the left
brace '{' at 'D:\AInterfaces.h(35)' was matched

What causes this error? How do we resolve it?

Regards,
Alamelu N
From: Victor Bazarov on
Alamelu wrote:
> There are 2 projects, Project A and Project B. I want to include a
> header file from Project B into project A. Project B is dependent on
> Project A.
> When including the header file of project B into A, i get the below
> mentioned error.
>
> D:\AInterfaces.h(490): error C2143: syntax error : missing ';' before
> 'string' D:\AInterfaces.h(490): fatal error C1075: end of file found
> before the left brace '{' at 'D:\AInterfaces.h(35)' was matched
>
> What causes this error? How do we resolve it?

Well, it seems there are two errors, not one. First -- 'string' is
most likely undefined. Try replacing it with 'std::string' and do
not forget to #include <string>. Second, you have an unmatched curly
brace in your file somewhere (or so it seems). It even tells you the
line number of the unmatched brace.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask