Ue4.20 c++ UCameraComponent how to set Field of view

Hello!
I need help with UE 4.20 API.
I just started to move my project to c++ and met with access restrictions by API.
For Example:
I created camera component in my custom pawn class, and tried to set camera fov property trough built in function SetFieldOfView(). But it turned out that it is private now. In official documentation sais that it should be public. I steel cant find any solution how to set Fov value.
Another example:
I created static mesh component and couldn’t set material for it. Built in fucntion SetMaterial(int, UmaterialInteface*) also became private.
Next example:
UMaterialDynamic *->SetVectorParameterValue () also is private.

I already read documetation, saw huge amount of tutorial in web, but it seems like that they are using compleatly different engine. I also checked all realise notes for every engine version and couldn’t find solution.
So i don’t understand what is happened to engine API and what i should do to work with it. If anybody knows how to set those params, please help me.
Thanks in advance.

Hi!
I already took into account all this added all the necessary inclusions in the header file. And I also know the signature of this function.
Here is my header file screen:

I checked the implementation of similar functions in FirstPersonTemplate and there the compiler also produces an error. Apparently these samples were written in an earlier version of the engine.

Here is a screenshot of the UCameraComponent class declaration from version 4.20.

This function, like many others, does not have a public specifier. Therefore, according to the rules of c++ they automatically become private.
The question is why is that and how to work with this now?

The correct function is CameraComponent->SetFieldOfView(FloatValue);
Be sure to declare the CameraComponent in your header file and to attach it to the SpringArmComponent or whatever Component you wish to attach your Camera to.

You may want to read the code and do some testing within the FirstPerson or ThirdPerson template where all elements are already set and ready to use.

No, my class derived from pawn, wich is doesn’t contain these components. If I used the character class as the parent, then I already would have these components. But it is not my choice, since i don’t need character movement component.

It seems I figured it out. I use Visual Studio 2017 for work, which uses standard C ++ rules to parse the code and shows an error when trying to use private functions.The IntelliSense mechanism relies on it. Apparently UE4 uses its own version of C ++, in which functions are explicitly undeclared as private, successfully compiled and run in the engine. Then my question is removed. Now everything works, despite earlier the compiler gave an error. IntelliSense errors can be ignored.
Thank you for your help!

Don’t you have already all these components inside the ACppMasterPawn?

when you declare CameraComponent I suppose you follow the usual path aka: CameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComponent"));

Yes, of course.
Mine looks like:
MainCamera = CreateDefaultSubobject(TEXT(“MainCamera”));

Actually i found what was problem. I posted answer on top.
Thanks for your help!