How to change Mesh value of a character?

My code:

AmyCharacter::AmyCharacter(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{

FString testSong = TEXT("SkeletalMesh'/Game/GenericMale.GenericMale'");
static ConstructorHelpers::FObjectFinder myAssetForTP(*testSong);
if (myAssetForTP.Object != NULL)
{
  Mesh = 	(USkeletalMeshComponent*)myAssetForTP.Object;
}

}

compiling it will produce this:


Error 2 error C2248: ‘TSubobjectPtr::operator
=’ : cannot access private member declared in class ‘TSubobjectPtr’ D:\Unreal Projects\FPSProject\Source\FPSProject\myCharacter.cpp 39


i know Mesh is a private variable for class ACharacter. so cannot change it directly but wondering if there is any function by which i can get access of change the value of Mesh ?

" Mesh->SetSkeletalMesh()"

from

solved the case.