F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_21645080_14804.cpp:4:6: error: expected nested-name-specifier before '&' token
 using namespace std;  
      ^
0_0_21645080_14804.cpp:4:21: error: expected identifier before '&' token
 using namespace std;  
                     ^
0_0_21645080_14804.cpp:4:26: error: expected constructor, destructor, or type conversion before ';' token
 using namespace std;  
                          ^
0_0_21645080_14804.cpp:4:27: error: 'std' does not name a type
 using namespace std;  
                           ^
0_0_21645080_14804.cpp:4:36: error: expected constructor, destructor, or type conversion before ';' token
 using namespace std;  
                                    ^
0_0_21645080_14804.cpp:4:42: error: expected constructor, destructor, or type conversion before ';' token
 using namespace std;  
                                          ^
0_0_21645080_14804.cpp:5:6: error: 'nbsp' declared as reference but not initialized
 long long ans[50];  
      ^
0_0_21645080_14804.cpp:5:16: error: redefinition of 'long int& nbsp'
 long long ans[50];  
                ^
0_0_21645080_14804.cpp:5:6: note: 'long int& nbsp' previously declared here
 long long ans[50];  
      ^
0_0_21645080_14804.cpp:5:21: error: 'ans' does not name a type
 long long ans[50];  
                     ^
0_0_21645080_14804.cpp:5:34: error: expected constructor, destructor, or type conversion before ';' token
 long long ans[50];  
                                  ^
0_0_21645080_14804.cpp:5:40: error: expected constructor, destructor, or type conversion before ';' token
 long long ans[50];  
                                        ^
0_0_21645080_14804.cpp:6:5: error: conflicting declaration 'int& nbsp'
 int main(){  
     ^
0_0_21645080_14804.cpp:5:6: note: previous declaration as 'long int& nbsp'
 long long ans[50];  
      ^
0_0_21645080_14804.cpp: In function 'int main()':
0_0_21645080_14804.cpp:7:29: error: 'nbsp' declared as reference but not initialized
     int n,a,b;  
                             ^
0_0_21645080_14804.cpp:7:34: error: 'n' was not declared in this scope
     int n,a,b;  
                                  ^
0_0_21645080_14804.cpp:7:36: error: 'a' was not declared in this scope
     int n,a,b;  
                                    ^
0_0_21645080_14804.cpp:7:38: error: 'b' was not declared in this scope
     int n,a,b;  
                                      ^
0_0_21645080_14804.cpp:8:25: error: 'cin' was not declared in this scope
     cin>>n;  
                         ^
0_0_21645080_14804.cpp:8:25: note: suggested alternative:
In file included from 0_0_21645080_14804.cpp:1:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
0_0_21645080_14804.cpp:9:25: error: 'ans' was not declared in this scope
     ans[1] = 1;  
                         ^
0_0_21645080_14804.cpp:9:37: error: expected primary-expression before '=' token
     ans[1] = 1;  
                                     ^
0_0_21645080_14804.cpp:10:37: error: expected primary-expression before '=' token
     ans[2] = 2;  
                                     ^
0_0_21645080_14804.cpp:11:33: error: 'nbsp' declared as reference but not initialized
     for(int i=3 ;i<50 ;i++){  
                                 ^
0_0_21645080_14804.cpp:11:38: error: 'i' was not declared in this scope
     for(int i=3 ;i<50 ;i++){  
                                      ^
0_0_21645080_14804.cpp:11:47: error: expected primary-expression before ';' token
     for(int i=3 ;i<50 ;i++){  
                                               ^
0_0_21645080_14804.cpp:11:47: error: expected ')' before ';' token
0_0_21645080_14804.cpp:11:48: error: 'i' was not declared in this scope
     for(int i=3 ;i<50 ;i++){  
                                                ^
0_0_21645080_14804.cpp:16:53: error: 'nbsp' declared as reference but not initialized
         int temp = abs(a-b);  
                                                     ^
0_0_21645080_14804.cpp:16:58: error: 'temp' was not declared in this scope
         int temp = abs(a-b);  
                                                          ^
0_0_21645080_14804.cpp:16:68: error: expected primary-expression before '=' token
         int temp = abs(a-b);  
                                                                    ^
0_0_21645080_14804.cpp:17:49: error: 'cout' was not declared in this scope
         cout<<ans[temp]<<endl;  
                                                 ^
0_0_21645080_14804.cpp:17:49: note: suggested alternative:
In file included from 0_0_21645080_14804.cpp:1:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
0_0_21645080_14804.cpp:17:66: error: 'endl' was not declared in this scope
         cout<<ans[temp]<<endl;  
                                                                  ^
0_0_21645080_14804.cpp:17:66: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39:0,
                 from 0_0_21645080_14804.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:564:5: note:   'std::endl'
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^
0_0_21645080_14804.cpp:19:32: error: invalid conversion from 'int*' to 'int' [-fpermissive]
     return 0;  
                                ^
0_0_21645080_14804.cpp: At global scope:
0_0_21645080_14804.cpp:20:7: error: expected constructor, destructor, or type conversion before ';' token
 }   
       ^
0_0_21645080_14804.cpp:20:13: error: expected constructor, destructor, or type conversion before ';' token
 }   
             ^
0_0_21645080_14804.cpp:20:19: error: expected constructor, destructor, or type conversion before ';' token
 }   
                   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-07-08 11:11:41, Gzip enabled