I'm learning how to program with C and I have a problem that I have never had before and don't know how to solve. I hope someone will be able to help me out.
I did this program:
When I run debug on my complier it gives me the following message that I have never encountered before:PHP Code:
int findMax(int, int ); /* prototype*/
int nums , i, j;
for (i=0; i < 200; ++i);
for (j=0; i < 200; ++j);
nums[i][j] = 2*i;
printf("The maximum value is %d \nin row $i column $j", findMax(*nums, 200), i, j);
int findMax(int vals, int numEls) /*find the maximum value*/
int i, *nums, max = vals ;
for (i=1; i < 200; ++i);
max = vals[i];
I understand that I must have something not completely right but can't figure out what? COuld you guys help me out.PHP Code:
Windows has triggered a breakpoint in Assignment 4A-2-a.exe.
This may be due to a corruption of the heap, and indicates a bug in Assignment 4A-2-a.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information