Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am compiling a code i-e .cpp file in Microsoft VC++ 2015 but its giving 100+ header file errors.Although included the file in start as # include "Myheader.h".
How to remove them?

What I have tried:

I am compiling a code i-e .cpp file in Microsoft VC++ 2015 but its giving 100+ header file errors.Although included the file in start as # include "Myheader.h".
How to remove them?
Posted
Updated 16-Aug-18 6:25am
v2
Comments
Jochen Arndt 2-Aug-18 2:58am    
That can't be answered without seeing some code and some (at least the first) complete error message.

Use the green 'Improve question' link to add this to your question:
- The first one to max. five complete error message (copy and pasted)
- The top of your cpp file (with all include directives)
- The Myheader.h file (truncated if too large, should contain the lines around those mentioned in the above error messages if they refer to this file)
Richard MacCutchan 2-Aug-18 3:36am    
You most likely have a missing control character in your header file. But without seeing your code, and at least the first few errors, it is impossible to guess where.
Rick York 3-Aug-18 2:00am    
If you started with "MyHeader.h" it could be that is the problem. If you used any variables that are of custom types in that file then they will be undefined and that results in errors. Also, if you are using pre-compiled headers and do not include stdafx.h or what ever is your designated header file first that can also cause errors.

As Jochen and Richard stated, it is impossible to give a definitive answer without seeing the code.

1 solution

the most common mistake is that the stdafx.h isnt the first included header. It is providing the MFC stuff.

If it doenst help provide some somplete lines of error messages.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900