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_38610050_8077.cpp:1:1: error: 'cout' does not name a type
 cout << "input A:" << endl;
 ^~~~
0_0_38610050_8077.cpp:2:5: error: 'string' does not name a type; did you mean 'struct'?
     string a;
     ^~~~~~
     struct
0_0_38610050_8077.cpp:3:12: error: expected constructor, destructor, or type conversion before '(' token
     getline(cin, a);
            ^
0_0_38610050_8077.cpp:4:5: error: 'cout' does not name a type
     cout << "input B:" << endl;
     ^~~~
0_0_38610050_8077.cpp:5:5: error: 'string' does not name a type; did you mean 'struct'?
     string b;
     ^~~~~~
     struct
0_0_38610050_8077.cpp:6:12: error: expected constructor, destructor, or type conversion before '(' token
     getline(cin, b);
            ^
0_0_38610050_8077.cpp:7:5: error: 'cout' does not name a type
     cout << "input n:" << endl;
     ^~~~
0_0_38610050_8077.cpp:8:5: error: 'string' does not name a type; did you mean 'struct'?
     string n;
     ^~~~~~
     struct
0_0_38610050_8077.cpp:9:12: error: expected constructor, destructor, or type conversion before '(' token
     getline(cin, n);
            ^
0_0_38610050_8077.cpp:11:23: error: 'a' was not declared in this scope
     int valueA = atoi(a.c_str());
                       ^
0_0_38610050_8077.cpp:11:18: error: 'atoi' was not declared in this scope
     int valueA = atoi(a.c_str());
                  ^~~~
0_0_38610050_8077.cpp:11:18: note: suggested alternative: 'auto'
     int valueA = atoi(a.c_str());
                  ^~~~
                  auto
0_0_38610050_8077.cpp:12:23: error: 'b' was not declared in this scope
     int valueB = atoi(b.c_str());
                       ^
0_0_38610050_8077.cpp:12:18: error: 'atoi' was not declared in this scope
     int valueB = atoi(b.c_str());
                  ^~~~
0_0_38610050_8077.cpp:12:18: note: suggested alternative: 'auto'
     int valueB = atoi(b.c_str());
                  ^~~~
                  auto
0_0_38610050_8077.cpp:13:23: error: 'n' was not declared in this scope
     int valueN = atoi(n.c_str());
                       ^
0_0_38610050_8077.cpp:13:18: error: 'atoi' was not declared in this scope
     int valueN = atoi(n.c_str());
                  ^~~~
0_0_38610050_8077.cpp:13:18: note: suggested alternative: 'auto'
     int valueN = atoi(n.c_str());
                  ^~~~
                  auto
0_0_38610050_8077.cpp:15:22: error: array bound is not an integer constant before ']' token
     int values[valueN];
                      ^
0_0_38610050_8077.cpp:16:5: error: 'values' does not name a type; did you mean 'valueN'?
     values[0] = 1;
     ^~~~~~
     valueN
0_0_38610050_8077.cpp:17:5: error: 'values' does not name a type; did you mean 'valueN'?
     values[1] = 1;
     ^~~~~~
     valueN
0_0_38610050_8077.cpp:19:5: error: expected unqualified-id before 'for'
     for (size_t i = 2; i < valueN; i++)
     ^~~
0_0_38610050_8077.cpp:19:24: error: 'i' does not name a type
     for (size_t i = 2; i < valueN; i++)
                        ^
0_0_38610050_8077.cpp:19:36: error: 'i' does not name a type
     for (size_t i = 2; i < valueN; i++)
                                    ^
0_0_38610050_8077.cpp:24:5: error: 'cout' does not name a type
     cout<< values[valueN - 1] << endl;
     ^~~~


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-23 08:03:21, Gzip enabled