Menu

Compiler does not pick-up errors in ".hpp"

2002-08-05
2012-09-26
  • Nobody/Anonymous

    Hi,

    I have declared a "Rectangle" Class and have saved it Rect.hpp.

    I have then set-out a second class Rect.cpp which incorporates the "Rect.hpp" class by having the following statement in the first line:

    #include "rect.hpp"

    Question:
    When I compile the Rect.hpp class the compiler does not seem to pick up any of the errors. How can be sure that Rect.hpp code is correct?

    Any ideas?

    Many Thanks.

     
    • Nobody/Anonymous

      First of all it is better not to rely on that the compiler ignores cases in filenames (rect.hpp and Rect.hpp) so adjust your cases!
      Second: does it compile? If the hpp comtains only the deklarations and the cpp file only the implementation it should not compile if the hpp is ignored!

      Thomas

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.