Wednesday, October 29, 2008

start coding

在程序里面include头文件的顺序会影响程序的编译,今天再次体会到了。

以下是正确的顺序:

#include "stdafx.h"
#include "windows.h"
#include "mapping.h"
#include "../utility/utility.h"

#include 
#include 
using namespace std;

而以下则不能编译:

#include 
#include 
using namespace std;

#include "stdafx.h"
#include "windows.h"
#include "mapping.h"
#include "../utility/utility.h"

或者以下也不行:

#include "mapping.h"
#include "stdafx.h"
#include "windows.h"
#include "../utility/utility.h"

#include 
#include 
using namespace std;

1 comment:

trinity said...

看不懂的說~~忽略~~~