你能帮我理解问题是什么吗?我似乎已经包括stdafx.h
. 然后我试图重建解决方案。试图清洁溶液。无论如何我得到这个:
c:\...\tetris\figure_factory.cpp(2): warning C4627: '#include "figure_factory.h"': skipped when looking for precompiled header use
1> Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\...\tetris\tetris\figure_factory.cpp(3): warning C4627: '#include "figure.h"': skipped when looking for precompiled header use
1> Add directive to 'StdAfx.h' or rebuild precompiled header
当然还有由于缺少头文件而导致的全套错误。
我的文件:
figure_factory.cpp
#pragma once
#include "figure_factory.h"
#include "figure.h"
#include "stdafx.h"
#define stop __asm nop
Figure I;
I.shape = {
{{0, 0, 0, 0},
{1, 1, 1, 1},
{0, 0, 0, 0},
{0, 0, 0, 0}},
......
figure_factory.h
#pragma once
#include "figure.h"
#include "stdafx.h"
#define stop __asm nop
class Figure_Factory{
const int figure_number = 5;
const int colour_number = 5;
public:
Figure get_figure(int type, int colour);
}