i have a simple function like that
function1 (string str1, string str2, int (&pos)[1])
{
//do some stuff
}
and then i call it
int main()
{
int test[1];
string a, b;
function1(a, b, test);
}
and it works just fine if i run it only once. But if i call this function again, for instance
int main(int test[1], string a, string b)
{
int test[1];
string a, b;
function1(a, b, test);
function1(a, b, test);
}
it gives me 0xC0000005 error. I can fix it by making 2 variables instead of an array with 2 elements but i want to know how to make it work with arrays.
User contributions licensed under CC BY-SA 3.0