Answer the question
In order to leave comments, you need to log in
How to pass by reference an array of strings that must be initialized in a function?
Hello.
For his own development, he took up the "remembering" of C ++.
There was a question that was asked in the topic.
Right now I'm implementing it like this:
void func(char *** results, DWORD * resultsCount)
{
... some code
*results = populatedArrayOfStrings;
*resultsCount = calculatedResultsCount;
}
char ** results;
DWORD resultsCount;
func(&results, &resultsCount);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question