Code example in the documentation doesn’t work - part 3

I’m not sure if this is another typo, missing additional info or outdated code but I’m getting more errors while trying to follow the introduction to C++ programming documentation, I’m using the same UE version the doc was made for so I don’t understand how why this is happening when I copied the code directly into VS


You have to declare the function in the .h file.
void CalculateValues();
You can’t just put a function in .cpp and expect it to work.

Thanks that fixed it.
Really wish they’d include this stuff in the documentation and not just assume a complete beginner would know this needed to be added

it could be slightly more clear about where this snippet it mentions goes, but…

Yes but that information only exists a bit further down in the next section. In the “Extending a C++ Class via Blueprints” section which contains the CalculateValues function there is no mention of this, it even says you should be able to see the changes after the code compiles without mentioning the additional steps required so I stopped at that point assuming I’d made a mistake or there was a problem with the code.