Cannot Cast to Actor Component from HUD Class in C++

Here you call the constructor of FVector2D with 2 arguments which form the X and Y of Result. why do you set X Y to 100 and 200 afterwards?

Following links are tutorials relevant to questions you asked / errors we found.

Undefined behavior - cppreference.com

C++ Constructors

https://cplusplus.com/doc/tutorial/structures/

C++ Functions - Return

C++ Programming Language | 9780321958327 | Bjarne Stroustrup | Boeken | bol.