What version of Visual Studio are you using? Visual Studio 2010 and above should be able to check for syntax errors, undefined identifiers, etc.
Recent versions of Eclipse can also do this. (In fact, Eclipse code analysis checks for several potential problems, such as uninitialized member variables, which my compiler does not support.) Since Eclipse is a full-blown IDE, it will not integrate with Visual Studio, but there is nothing to prevent you from creating an Eclipse project. containing the same files as another IDE project, and using Eclipse for editing, and another IDE for building and debugging. (I use Eclipse with Embarcadero C ++ Builder because I prefer Eclipse as an IDE for Embarcadero C ++ Builder.)
Update: Visual C ++ apparently refers to this as an IntelliSense error message, and you can enable it under tools, options, text editor, C / C ++, Advanced, IntelliSense. There is additional information in this blog post .
source share