I’m quite new to Unreal (although not to C++), and I’m trying to add to the PROJECTNAME.h
file the following inline function:
void inline Print(const string& s) {
UE_LOG(LogTemp, Warning, TEXT(s));
}
And encountered several problems while compiling:
CompilerResultsLog:Error: Error D:\CS\Unreal Course\BuildingEscape\BuildingEscape\Source\BuildingEscape\BuildingEscape.h(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
CompilerResultsLog:Error: Error D:\CS\Unreal Course\BuildingEscape\BuildingEscape\Source\BuildingEscape\BuildingEscape.h(8) : error C2143: syntax error: missing ',' before '&'
CompilerResultsLog:Error: Error D:\CS\Unreal Course\BuildingEscape\BuildingEscape\Source\BuildingEscape\BuildingEscape.h(9) : error C2065: 'Ls': undeclared identifier
Which are really unclear to me, as the following code for example, will compile without problems: Coliru Viewer