Character class C++ error

Hi!

I’m quite new to Unreal Engine and C++. I’m following the Twin Stick Shooter tutorial (link:text) and I’ve got problems with building the character class code. I think it’s because I’m using different version of UE4 but I have no idea how to fix this.

Visual studio is throwing following errors:

1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Build started: Project: Harjoittelua, Configuration: Development_Editor x64 ------
2>Compiling game modules for hot reload
2>Performing 3 actions (4 in parallel)
2>Shooter.cpp
2>D:\Program Files\Unreal Engine 4\UE_4.18\Engine\Source\Runtime\Engine\Classes\GameFramework/RootMotionSource.h(12): error C2144: syntax error: ‘ACharacter’ should be preceded by ‘;’
2>D:\Program Files\Unreal Engine 4\UE_4.18\Engine\Source\Runtime\Engine\Classes\GameFramework/RootMotionSource.h(12): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>ERROR : UBT error : Failed to produce item: D:\Projects\UE4\Harjoittelua\Binaries\Win64\UE4Editor-Harjoittelua-2710.dll
2>Total build time: 1,89 seconds (Local executor: 0,00 seconds)
2>D:\Program Files\Visual Studio\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ““D:\Program Files\Unreal Engine 4\UE_4.18\Engine\Build\BatchFiles\Build.bat” HarjoitteluaEditor Win64 Development “D:\Projects\UE4\Harjoittelua\Harjoittelua.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.
2>Done building project “Harjoittelua.vcxproj” – FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========