Each time the function is being called, i want to create a new array with a new name to save the results and later compare different arrays to check if they are the same. I want the arrays being created with different but uniformed names each time like array1, array2.... And will "static" keyword work because these arrays need to remain in the memory after the function returned.
something like this
func()
{static char array1[10];
.......
}
std::vector? It does the job for youstaticmeans that your array isn't allocated on the stack (ie, whenfuncis called), but rather in the data section of your program, but with visibility limited tofunc. The feature you describe isn't possible in C++ that way.array9[5] = 3;? Or do you merely wish to check if they exist? If the later, you will need some sort of container to store and index them.