Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » No error when class not #included?
No error when class not #included? [message #1007872] Thu, 07 February 2013 15:36
Ken K is currently offline Ken K
Messages: 1
Registered: November 2012
Junior Member
Hi. I am using Indigo with CDT 8.0.2. I created a new C++ Makefile project. I then wrote a test that uses class MyClass. As expected, Eclipse showed me an error that said MyClass was unresolved.

I then created MyClass using File::New::Class. That worked great. However, I noticed that even though my test did not have a #include for MyClass.h, the error stating that MyClass was not resolved had gone away. So this left my test code with an error that Eclipse did not detect, namely that I was using a class without having #included that class's header file.

Is this correct behavior for CDT? If so, is there some preference I can set to get Eclipse to show me when I have failed to include a class's definition?

Thanks!

Ken
Previous Topic:Inherit file encoding from file?
Next Topic:eclipse creates exe for C++ not for C project
Goto Forum:
  


Current Time: Sat Aug 23 11:32:43 EDT 2014

Powered by FUDForum. Page generated in 0.05185 seconds