Hello. I noob with C++, i trying to understand that but i think i missed some concept about programming. I think must be something basic but … noob here.
Where are you trying to use UDeskCapture::AddStringToArray(Test);? If you are still within DeskCapture.cpp you should only need AddStringToArray(Test); since you’re still working within the same class.
If you are trying to call AddStringToArray from another class you first have to use an include statement to include DeskCapture.h in the other class so that it understands what DeskCapture and AddStringToArray are. You will then need to add a pointer reference to UDeskCapture which allows you to use the pointer to access AddStringToArray in the form of RandomVariable->AddStringToArray("Some string");
SomeClassType* Item = new SomeClassType;
Item->SomeNonStaticFunction();
Static functions operate on the type as a whole, whereas instance functions are on a per instance basis. With that said, you must be creating an instance in Blueprints and operating on it.
Thanks. I think i need a instance but still not sure how to do what i want. I now i missed a concept for create what i want but not figure what.
I will try working on more complete code for show more explicit my problem or.
But idea simplified i have a function that call other functions in the code (not same class where i have AddString… ) that generate let say when i call it from BP 4 strings, one each, i want be able add “AddStringToArray(thisString)” in each function to send to a another class for store in a array, for access from BP to this array.