Problem description: I'm currently working on a program that contains a 2D-Array in a function. Since I wish to update it inside another function I declared it a static array like this:
1 2 3 4 5
|
static char arr[A_M][A_N] = { '.', '.', '.' ....... };
chFunction(arr, SIZE);
...
|
The problem is that once I try to pass this array to another function, where the dots are replaced by actual characters A ... D ... R so on so forth, the following problem occurs.
When I run it thru the debugger, having a breakpoint on the code that changes the dots to A for instance in the other function, it says that symbols can not be found when I hover over the array variable ... This ONLY happens when I declare the array static, when I set it to simply char arr[][] ... and I hover over the variable in the other function, no error of missing symbols.
It also happens if I simply want to display the content of the array in a loop. Once breakpoint is set in the other function, and hovering over it, it gives me this missing symbols from symbol file ...
I'm still very much beginner, but as I understand it, the symbol that cannot be loaded/found in the other function, it must have to do with the array variable that is passed via function call to the other function.
If i put the same code that changes the array into the function (where I don't wish to have it ...), and even though set to static, and I hover over the changing function, it behaves like normal, no symbol missing message appearing while hovering over it. This hardens the evidence that it must have to do with passing the array to the other function like so:
And at that point I'm totally lost. How would I declare a static array, and pass it to the other function, so that it keeps its data inside one function, once updated in another? Or, rather the question is, how would I pass a static array to another function, so that the symbol while debugging still is loaded, or processed, once passed to it?
I'm working with the community edition of VS 2015. And this is the only and first time I ran into this problem. Probably because it is also the first time I use an array set to static, which I would need, to update it from one function to the next. So, if you know a solution to this, please let me know.
Edit: The program still works as should be, even with the symbol file missing during debugging. Yet, still, this is an error of sorts, that I feel should not be there and I wish to get rid of it.