Passing an array to a function, but if it doesn't return true I want to pass an extra digit?
<p>So for my code I want to pass an argument to a function and if it doesn't return true, I want it to pass the next index digit in the int array. </p>

<p>So if areaIntA[0] = 0; doesn't return true, I want it to pass areaIntA[0][1] = 01; and if that doesn't return true, areaIntA[0][1][2] = 012; etc...</p>

<p>My updated code:</p>

<pre><code>areaInt = areaIntA[0];

do {
    areaCheck = isRegistered(file, areaInt);
    if (areaCheck != 1)
    {
    areaInt = areaIntA[i] * 10 + areaIntA[i+1];
    i++;
    }
} while (areaCheck != 1);

cout &lt;&lt; areaCheck &lt;&lt; endl;
</code></pre>

<p>This compiles but it shows a segmentation error, anyone know why?</p>
