请教:error C2653和error C2550
zico1998@163.com
我的代码如下:
/************StdAfx.h************/
#pragma once#define WIN32_LEAN_AND_MEAN
// Windows 头文件:
#include <windows.h>
// C 运行时头文件
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
// TODO: 在此处引用程序要求的附加头文件
#include <list>
#include <cmath>
#include <time.h>
#include <sstream>
#include <fstream>using namespace std;
//我自己的库
#include "game.h"
#endif
/************game.h************/
#ifndef _GAME_H
#define _GAME_H
class Game{
HWND GameWindow; //控制台窗口句柄
public:
Game(HWND);
};
#endif
/************game.cpp************/
#include "stdafx.h" //这里换成#include "StdAfx.h"也一样
Game::Game(HWND hwnd):GetWindow(hwnd)
{
}
报错为error C2653: 'Game' : is not a class or namespace name
error C2550: 'Game' : constructor initializer lists are only allowed on constructor definitions
warning C4508: 'Game' : function should return a value; 'void' return type assumed
请问哪里怎么错了?查了一中午一下午,郁闷