|
|
вернуться в форумWhy "Crash (access violation)" ? totally misunderstood Hello all. I have some problem with this task? Why crash:acces violation? Here is the code ------------------------------------------------- #include <iostream> #include <map> #include <algorithm> #include <vector> using namespace std; int main () { int n,i,j; int a[100]; cin>>n; for( i=0;i<n*n;i++) cin>>a[i]; sort(a,a+n*n); for( i=0;i<n*n;i++) cout<<a[i]<<" "; return 0; } I didn't use two dimensional arrays cause I'had tried to find the laziest way. Could u help ? Local test on computer is pretty good, u can check by trying code by yourselves; Re: Why "Crash (access violation)" ? totally misunderstood Послано NuVeS 16 мар 2013 11:22 The problem is not to sort array. Check it again!!! |
|
|