I can't seem to understand why my program isn't working, could someone look over it? I'm not getting any error messages when I run it so I don't know what to look for. Any help would be appreciated.
Is your program:
1) Not compiles
* Is other code compiles correctly, i. e. is your compiler configured properly?
* If it is, give us error message and corresponding code part.
2) Not running
* Are you sure that it is not a problem with automatically closing console?
* How do you run it?
* Is there any error messages?
3) Gives an error when run
* Is it system error message or error reported in console?
* Give us error message and input which leads to error.
4) Not giving correct results
* Tell what you entered, what you expected, and what you got.
* Are you sure that results you expected are correct?
The program compiles but, the g.ex stops working when it is suppose to print out the values. When I run the debugger this is the message I get: Unhandled exception at 0x00BC1650 in g.exe: 0xC0000005: Access violation reading location 0x19B6C050.
Both AmountOwned and AmountPaid contains only one value. So access to values at AmountOwned[1, AmountPaid[1] is illegal. You got lucky with AmountOwned and your program did not crash as soon as line 31, but illegal access to AmountPaid leads to crash.