Thursday, March 31, 2005

[Tech] Strange stuff in C++

  1. Whenever you declare a class, be sure that you end the declaration with ';'. Error message from compiler may look irrelevant. It can be 'error C2533: 'TextImageExporter::__ctor' : constructors not allowed a return type'.
  2. If you are using stdafx.h to reduce recompilation time, you need to #include it in every cpp file in the project (even though you don't want to reduce the compile time for some files). If not, you will get this error message:
    fatal error C1010: unexpected end of file while looking for precompiled header directive

No comments: