私はレーシングゲームに取り組んでいたので、ハンドルサポートを追加したいと思います。私はUWP(here is the page)を使用しています。 Microsoftがあなたがすべきことを言うようにappxmanifestにコードを追加しましたが、まだエラーメッセージが表示されます。C++ UWP実装
RacingWheel::RacingWheels
-Nameが続く:
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);
}
};
次のようにエラーがある
#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();
};
Input.h:ここでのコードは::クラスまたは名前空間でなければならない
Vector<RacingWheel^>
-expectedタイプ識別子
式
私はCに新たなんだが-expected ++ので、任意のヘルプは大歓迎です。
これはC++ではありません。それはC++/CLIですか? –