How to properly declare a function in C++?

Check API refrence, declerations of funtions are there including UFUNCTION

if you want a function to work in CPP and blueprint, try this:
in the editor, go to file> add code to project, and make a new class based off HUD called myHud.

//inside the myHud.h class, between the brackets add:
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "MyStuff")
FString getWords( FString Word1, FString Word2 );

//at the end of the myHud.CPP file, after the brackets add:
FString myHud::getWords_Implementation( FString Word1, FString Word2 )
{
     return Word1;
}

Hello!

This is what I have now:

UFUNCTION([BlueprintCallable], [meta(word1 = value, word2 = value)])
	ReturnType getWords([Word1, Word2]);

There is probably a ton wrong with it, but this is as far as I have gotten with the documentation (which never gave an example of what a working function looks like)

how do you set the inputs the blueprint node will take in? Thanks!

The input for the function is: ( FString Word1, FString Word2 )

oh, so the line 3 is inputs, and the line 8 is an output? In which case, can I have more than 1 output?

No, only one return value for a function. But you can pass data in by reference, which will change your variable you pass in:

void myHud::getWords_Implementation( FString &Word1, FString Word2 )
{
    Word1 = "SomeWord";
} 

You may want to do some reading up on C++ functions by the sounds of it.

and as i said look on functions in api refrence, most function in UE4 is declered same way looking on existing nodes and seeing how they declered is best way to learn secrets of UFUNCTION