I can't build simple class

Hello. I am trying to add a simple C++ class to my project and somehow I’m getting errors that I can’t resolve. Header file looks like this:

#pragma once

#include "Object.h"
#include <vector>
#include "CubeCommunicationInterface.generated.h"


UCLASS(BlueprintType)
class ESCAPEROOMTEST_API UCubeCommunicationInterface : public UObject
{
	GENERATED_BODY()

private:
	//std::vector<int8> encoders;

public:
	UFUNCTION(BlueprintCallable)
	bool Connect();

	UFUNCTION(BlueprintCallable)
	bool ResetCube();

	UFUNCTION(BlueprintCallable)
	bool Disconnect();

	UFUNCTION(BlueprintCallable, BlueprintPure)
	int8 GetEncoder(int8 encoderIndex);

};

Errors that I’m getting are:

  • IntelliSense: this declaration has no storage class or type specifier

for “UCLASS” keyword.

  • IntelliSense: expected a ‘;’

for “class” keyword.

I have no idea how to resolve this and I can’t find any solution online…

First of all remove this:

#include <vector>

You should use UE4 containers, instead of STD something; )

TArray is what you seek.

Then paste here true compilation errors, not the error from IntelliSense.