Draw Crosshair c++ litle help

Hi there, so at this point im drawing the crosshair , and in this lines im getting errors in the word Canvas.

void AMyHUD::DrawCrosshair()
{
	float TextureWidth = CrosshairTexture->GetSurfaceWidth();
	float TextureHeight = CrosshairTexture->GetSurfaceHeight();
	 
	FVector2D const CanvasCenter(Canvas->ClipX * 0.5f, Canvas->ClipY * 0.5f);
	FVector2D const DrawPosition(CanvasCenter.X = TextureWidth * 0.5f, CanvasCenter.Y - TextureHeight * 0.5f);

	FCanvasTileItem TileItem(DrawPosition, CrosshairTexture->Resource, FLinearColor::White);
	TileItem.BlendMode = ESimpleElementBlendMode::SE_BLEND_Translucent;

	Canvas->DrawItem(TileItem);
}

Im pretty sure it must be something pretty easy.
It says : Pointer to incomplete class type is not allowed
And in CanvasCenter it says : expression must be modifiable lvalue

Any help ?
I’m using version 4.7.2
Thank you

You are setting CanvasCenter as constant but modifying it in the next line? (CanvasCenter.X =…)

The “Pointer to incomplete class type” error happens when a class is forward-declared in the .h file, but not included in the .cpp file, so you should add an include in your .cpp file for whichever class is giving you trouble.

BaderThanBad has already given the answer to the “Expression must be modifiable” error.

Add #include "Runtime/Engine/Classes/Engine/Canvas.h" In your HUD .h file. cheers.