|  | 
|  | 
| вернуться в форум | Why Access Violation?(C++) #include <iostream>#include <math.h>
 #include <iomanip>
 using namespace std;
 
 typedef double dataType;
 const int max_length = 300000;
 
 dataType array[max_length];
 
 int main()
 {
 __int64 input;
 int i = -1;
 
 while(scanf("%I64d",&input))
 array[++i] = sqrt((double)input);
 
 cout << fixed << setprecision(4);//Set Output's format
 
 for(i--;i>=0;i--)
 cout<<array[i]<<endl;
 
 return 0;
 }
 
 /*
 This program can run in my own computer,but when I submit I got the Error Message -- Access Violation.
 Who can tell me why?
 */
 
 Edited by author 23.03.2011 08:42
 | 
 | 
|