133k views
4 votes
C++ in MS Visual Studio, continues to receive error code E0276 (identifier is undefined) in both header and CPP files. This is new to me but please help. I do use code "using namespace std;

I included the header file the identifier is defined in (code - #include "degree.h") , but the compiler doesn't really connect it and wants me to include ..//degree.h

1 Answer

5 votes

Final answer:

To resolve the E0276 error in C++ MS Visual Studio, ensure the necessary header file is included and the identifier is properly defined. Use the relative path to specify the header file's location.

Step-by-step explanation:

The error code E0276 (identifier is undefined) in C++ MS Visual Studio indicates that the compiler is unable to find the definition of a particular identifier. To resolve this issue, you need to ensure that the necessary header file is included and that the identifier is properly defined.

In your case, you mentioned using the code using namespace std; and including the header file #include "degree.h". However, the compiler is still not recognizing the identifier and suggests including ..//degree.h.

This suggests that the compiler is expecting the header file to be located in a different directory. You can try including the header file using the relative path #include "..//degree.h" to specify its location correctly.

User Jackhao
by
7.8k points