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_39616853_23932.cpp:6:12: error: wrong number of template arguments (0, should be at least 1)
    6 | vector <int> div(vector<int> &a,int t,int &r){
      |            ^
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/vector:66,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/functional:64,
                 from .\stdc++.h:53:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:423:11: note: provided for 'template<class _Tp, class _Alloc> class std::vector'
  423 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
0_0_39616853_23932.cpp:6:28: error: wrong number of template arguments (0, should be at least 1)
    6 | vector <int> div(vector<int> &a,int t,int &r){
      |                            ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:423:11: note: provided for 'template<class _Tp, class _Alloc> class std::vector'
  423 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
0_0_39616853_23932.cpp:6:37: error: 't' has not been declared
    6 | vector <int> div(vector<int> &a,int t,int &r){
      |                                     ^
0_0_39616853_23932.cpp:6:43: error: expected identifier before '&' token
    6 | vector <int> div(vector<int> &a,int t,int &r){
      |                                           ^
0_0_39616853_23932.cpp: In function 'int div(int&, int, int&)':
0_0_39616853_23932.cpp:8:20: error: wrong number of template arguments (0, should be at least 1)
    8 |         vector <int>ans;
      |                    ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:423:11: note: provided for 'template<class _Tp, class _Alloc> class std::vector'
  423 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
0_0_39616853_23932.cpp:10:17: error: 'i' was not declared in this scope
   10 |         for(int i=0;i<a.size();i++){
      |                 ^
0_0_39616853_23932.cpp:10:25: error: request for member 'size' in 'a', which is of non-class type 'int'
   10 |         for(int i=0;i<a.size();i++){
      |                         ^~~~
0_0_39616853_23932.cpp:12:24: error: 't' was not declared in this scope
   12 |                 if(r>= t){
      |                        ^
0_0_39616853_23932.cpp:13:29: error: request for member 'push_back' in 'ans', which is of non-class type 'int'
   13 |                         ans.push_back(r/t);
      |                             ^~~~~~~~~
0_0_39616853_23932.cpp:16:30: error: request for member 'push_back' in 'ans', which is of non-class type 'int'
   16 |                         ans .push_back(0);
      |                              ^~~~~~~~~
0_0_39616853_23932.cpp:20:19: error: request for member 'front' in 'ans', which is of non-class type 'int'
   20 |         while(ans.front() == 0 && ans.size()>1){
      |                   ^~~~~
0_0_39616853_23932.cpp:20:39: error: request for member 'size' in 'ans', which is of non-class type 'int'
   20 |         while(ans.front() == 0 && ans.size()>1){
      |                                       ^~~~
0_0_39616853_23932.cpp:21:21: error: request for member 'erase' in 'ans', which is of non-class type 'int'
   21 |                 ans.erase(ans.begin());
      |                     ^~~~~
0_0_39616853_23932.cpp:21:31: error: request for member 'begin' in 'ans', which is of non-class type 'int'
   21 |                 ans.erase(ans.begin());
      |                               ^~~~~
0_0_39616853_23932.cpp: In function 'int main()':
0_0_39616853_23932.cpp:33:13: error: 'temp' was not declared in this scope; did you mean 'tm'?
   33 |         int temp = 1;
      |             ^~~~
      |             tm
0_0_39616853_23932.cpp:35:19: error: wrong number of template arguments (0, should be at least 1)
   35 |         vector<int> a;
      |                   ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:423:11: note: provided for 'template<class _Tp, class _Alloc> class std::vector'
  423 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
0_0_39616853_23932.cpp:38:19: error: request for member 'clear' in 'a', which is of non-class type 'int'
   38 |                 a.clear();
      |                   ^~~~~
0_0_39616853_23932.cpp:40:25: error: 'i' was not declared in this scope
   40 |                 for(int i=0;i<str.size();i++){
      |                         ^
0_0_39616853_23932.cpp:41:27: error: request for member 'push_back' in 'a', which is of non-class type 'int'
   41 |                         a.push_back(str[i]-'0');
      |                           ^~~~~~~~~
0_0_39616853_23932.cpp:44:21: error: 'r1' was not declared in this scope
   44 |                 int r1,r2 ;
      |                     ^~
0_0_39616853_23932.cpp:44:24: error: 'r2' was not declared in this scope
   44 |                 int r1,r2 ;
      |                        ^~


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-22 20:52:40, Gzip enabled