i using this tuturial to make my login screen in c++
i using visual studio 2015 Comunity and Unreal Engine 4.15.2https://youtube.com/watch?v=1wY35cep5V4and i have this errors
Severity Code Description Project File Line Suppression State
Error (active) pointer to incomplete class type is not allowed FirstGame c:\Users\Pedro\Documents\Unreal Projects\FirstGame\Source\FirstGame\StateManager.cpp 41
Error C2275 ‘UUserWidget’: illegal use of this type as an expression FirstGame C:\Users\Pedro\Documents\Unreal Projects\FirstGame\Source\FirstGame\StateManager.cpp 40
Error C2027 use of undefined type ‘UUserWidget’ FirstGame C:\Users\Pedro\Documents\Unreal Projects\FirstGame\Source\FirstGame\StateManager.cpp 41
Error C2227 left of ‘->AddToViewport’ must point to class/struct/union/generic type FirstGame C:\Users\Pedro\Documents\Unreal Projects\FirstGame\Source\FirstGame\StateManager.cpp 41
Error (active) type name is not allowed FirstGame c:\Users\Pedro\Documents\Unreal Projects\FirstGame\Source\FirstGame\StateManager.cpp 40
my code
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Engine/GameInstance.h"
#include "StateManager.generated.h"
/*Unumeration class */
UENUM(BlueprintType)
enum class EGameState :uint8 {
ENone UMETA(DisplayName = "None"),
EStartup UMETA(DisplayName = "Start"),
ELoginScreen UMETA(DisplayName = "LoginScreen"),
};
/**
*
*/
UCLASS()
class FIRSTGAME_API UStateManager : public UGameInstance
{
GENERATED_BODY()
public:
UPROPERTY(EditDefaultsOnly, Category = "State Manager")
TSubclassOf<class UUserWidget> cLoginMenu;
virtual void Init() override;
UFUNCTION(BlueprintCallable, Category = "State Manager")
void ChangeState(EGameState newState);
EGameState GetGameState();
private:
UUserWidget *currentWidget;
EGameState currentState;
void EnterState(EGameState newState);
void LeaveState(EGameState oldState);
};
Severity Code Description Project File Line Suppression State
Error C2275 'UUserWidget': illegal use of this type as an expression FirstGame C:\Users\Pedro\Documents\Unreal Projects\FirstGame\Source\FirstGame\StateManager.cpp 40
Error C2027 use of undefined type 'UUserWidget' FirstGame C:\Users\Pedro\Documents\Unreal Projects\FirstGame\Source\FirstGame\StateManager.cpp 41
Error C2227 left of '->AddToViewport' must point to class/struct/union/generic type FirstGame C:\Users\Pedro\Documents\Unreal Projects\FirstGame\Source\FirstGame\StateManager.cpp 41