Problem with passing Array by reference

Hi all,
I have a small problem with passing array by reference. When i call a function like this:
1
2
3
4
5
6
7
8
9
10
11

Parser::parse_table(_PC1);
Parser::parse_table(_PC2);


void Parser::parse_table(int *table)
{
 while(index < end)
   table[index++] = atoi(line);
	
}


I found the contents of _PC1 changed after parsing _PC2. did i do something wrong? :(
What are _PC1 and _PC2?
both of them are array of integers
int _PC1 [64];
int _PC2 [64];
Is _PC1 modified even if you pass only _PC2 and never _PC1?
thanks a lot, you lead me to my mistake, while rearranging them, i found that i had parsed one of them wrongly. The size allocated for _PC2 was smaller than the size of parsed array, maybe these excess elements were added in the memory locations of the previous array. Am i right?
If you went off the boundaries of an array, the result can be anything.
Topic archived. No new replies allowed.