#include "stdafx.h"
      #include "clientView.h"
以这个顺序没什么问题。 但是如果是
      #include "clientView.h"   
      #include "stdafx.h"
就有问题了,为什么?

解决方案 »

  1.   

    许多必须的系统头文件被包含在stdafx.h中,所以需要放在第一行,否则用到的某些类型就没有被定义
      

  2.   

    我在#include "stdafx.h"
    之前定义了一个宏#define NUM  1234
    还是不行,但是我把project->setting->c/c++ ->Category 中的precompile headers选项改成 not using precompile headers 又可以了,没有错误
    请问precompile headers到底是干什么的啊?
      

  3.   

    顺序当然有问题了,因为程序初始化要先包含stdafx.h