I try to make this work and after put it into a class, but i cant find out where i got mistakes... i know they exist... please help me find out ...
thanks in advance :)
cpp: In function `int main()':
cpp:41: error: invalid conversion from `int' to `int*'
cpp:23: error: too few arguments to function `void ReadArray(int*, int)'
cpp:41: error: at this point in file
cpp:44: error: invalid conversion from `int' to `int*'
cpp:13: error: too few arguments to function `void DisplayArray(int*, int)'
cpp:44: error: at this point in file
cpp:35: warning: unused variable 'i'
cpp:53:3: warning: no newline at end of file
To pass an array to a function don't use subscript.
You need to pass a value for every parameter if you don't provide a default value on the function declaration.
Variable names in one function don't affect variables with the same name on other functions
i is never used. You should receive a warning about this along the lines of Warning: unused variable 'i'.
I'm with Bazzy on this one.
There's a problem with both ReadArray( ) and DisplayArray( ). Firstly, what if you pass an array that has less than 10000 elements? Both of your method's for loops with over-step the array's boundaries, potentially crashing your program. Secondly, Start in both methods is never checked to make sure that it's a valid index.