c++ passing function into main error
<p>hi i have following c++ code where i want call function into main, following are my code:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;numeric&gt;

int main()
{

    using namespace std;

    readData();

    int sumA = accumulate(A, A + sizeof(A) / sizeof(int), 0);
    int sumB = accumulate(B, B + sizeof(B) / sizeof(int), 0);

    cout &lt;&lt; ((sumA &gt; sumB) ? "Array A Greater Than Array B\n" : "Array B Greater Than Array A\n");


    return 0;
}

void readData()
{

int A[] = { 1, 1, 8};
int B[] = { 2, 2, 2};
}
</code></pre>

<p>I have following error on cli :</p>

<pre><code>test.cpp:3:7: error: storage size of ‘B’ isn’t known
test.cpp:4:7: error: storage size of ‘A’ isn’t known
</code></pre>

<p>Where am i wrong here? Thanks</p>
