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_38899165_21177.cpp:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
0_0_38899165_21177.cpp:5:1: error: expected primary-expression before 'int'
    5 | int a,b;
      | ^~~
0_0_38899165_21177.cpp:5:1: error: expected '}' before 'int'
0_0_38899165_21177.cpp:4:9: note: to match this '{'
    4 | int main{
      |         ^
0_0_38899165_21177.cpp:6:1: error: expected unqualified-id before 'while'
    6 | while(cin>>a>>b){
      | ^~~~~
0_0_38899165_21177.cpp:8:9: error: expected unqualified-id before 'return'
    8 |         return 0;
      |         ^~~~~~
0_0_38899165_21177.cpp:9:1: error: expected declaration before '}' token
    9 | }
      | ^


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-11-17 04:46:18, Gzip enabled