Need help with returning a 2D array C++, please
<p>I'm trying to create an array and pass it to functions, which then return it, but I don't know the correct way of returning.
I've been looking around tutorials and trying stuff out, but haven't managed to solve this.
I'm new to C++ and thought it would be similar to Java, but apparently it isn't.</p>

<p>This is where I've gotten:</p>

<pre><code>class MainClass {

public:
    static int countLetterCombinations(string array[], int numberOfWords) {
        // Code
        return totalCombos;
    }


    // This is the function I'm having trouble with.
    static string** sortCombos(string combinations[][3]) {
            // Do something
        return combinations; // This gives converting error.
    }

};


int main() {

// Code

int numberOfCombinations = MainClass::countLetterCombinations(words, numberOfWords);

string combinations[numberOfCombinations][3];

combinations = MainClass::sortCombos(combinations);

// Further code

}
</code></pre>

<p>Anyone know how to fix this?</p>
