0
所以我一直在研究赛车游戏,所以我想添加方向盘支持。我正在使用UWP(here is the page)。我已经将代码添加到Microsoft的appxmanifest中,您应该这样做,但我仍然收到错误消息。下面是代码:C++ UWP执行
Input.cpp
#include "pch.h"
#include "Input.h"
#include <vector>
#include <Windows.h>
#include <windows.gaming.input.h>
#include <windows.gaming.input.custom.h>
#include <windows.gaming.input.forcefeedback.h>
Input::Input()
{
}
bool Input::Detect()
{
Windows::Gaming::Input::RacingWheel RacingWheel;
auto Wheels = ref new Vector<RacingWheel^>();
for (auto racingwheel : RacingWheel::RacingWheels)
{
Wheels->Append(racingwheel);
}
};
Input.h
#pragma once
#include <windows.gaming.input.h>
#include <windows.gaming.input.custom.h>
#include <windows.gaming.input.forcefeedback.h>
ref class Input sealed
{
public:
Input();
bool Detect();
private:
void Acquire();
};
是错误如下:接着
RacingWheel::RacingWheels
-Name ::必须是类或名称空间
Vector<RacingWheel^>
-expected类型标识符
-expected表达
我是新的C++,因此任何帮助表示赞赏。
这不是C++。它是C++/CLI吗? – 2017-06-29 15:18:49