Creating a new object but missing argument

I have a QuestManager header which contains this TAarray that contains my Quest object.

TArray<AQuest*> currentQuest;

and my my QuestManager constructor, I am trying to add a new object to this TArray

currentQuest.Add(NewObject<AQuest>(*findRow->questName, *findRow->questDescription));

But here is where I keep getting this error:

Error 1 error C2665: ‘NewObject’ : none of the 2 overloads could convert all the argument types

and this is my output

C:\Users\daniel\Documents\Dark Rising Studios\DRSDEPOT\Immortal Dawn[Unreal Project]\ImmortalDawn 4.9\Source\ImmortalDawn\QuestManager.cpp(26): error C2665: ‘NewObject’ : none of the 2 overloads could convert all the argument types
c:\program files\epic games\4.9\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(1134): could be ‘T *NewObject(UObject *,FName,EObjectFlags,UObject *,bool,FObjectInstancingGraph *)’
with
[
T=AQuest
]
c:\program files\epic games\4.9\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(1122): or ‘T *NewObject(UObject *,UClass *,FName,EObjectFlags,UObject *,bool,FObjectInstancingGraph *)’
with
[
T=AQuest
]
while trying to match the argument list ‘(const FString, const FString)’

this my my Quest constructor:

AQuest::AQuest(const FString qName, const FString qDescription)
{
	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;
	isQuestCompleted = false;
	isQuestDropped = false;

	name = qName;
	description = qDescription;
}

As you can see it is really simple, so I don’t know what is the problem.

Hello danielsega,

As you can see, method NewObject(…) takes arguments:

template< class T >
T* NewObject(UObject* Outer = (UObject*)GetTransientPackage(), UClass* Class = T::StaticClass(), FName Name = NAME_None, EObjectFlags Flags = RF_NoFlags, UObject* Template = nullptr, bool bCopyTransientsFromClassDefaults = false, FObjectInstancingGraph* InInstanceGraph = nullptr)

template< class T >
T* NewObject(UObject* Outer, FName Name, EObjectFlags Flags = RF_NoFlags, UObject* Template = nullptr, bool bCopyTransientsFromClassDefaults = false, FObjectInstancingGraph* InInstanceGraph = nullptr)

If your AQuest inherited from UObject you have to create new object following this:

NewObject(yourOuter, AQuest::StaticClass());

Hope this helps.