Record Detail

Compile Error

In file included from /in/compile/ex2.cpp:1:0:
/in/ex2.h: In function 'int hex2decLinkedList(Node*)':
/in/ex2.h:26:5: error: 'vector' was not declared in this scope
     vector<int> value;
     ^~~~~~
/in/ex2.h:26:5: note: suggested alternative:
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/ex2.h:7,
                 from /in/compile/ex2.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:216:11: note:   'std::vector'
     class vector : protected _Vector_base<_Tp, _Alloc>
           ^~~~~~
In file included from /in/compile/ex2.cpp:1:0:
/in/ex2.h:26:12: error: expected primary-expression before 'int'
     vector<int> value;
            ^~~
/in/ex2.h:28:8: error: 'value' was not declared in this scope
     if(value[idx]=="A"){
        ^~~~~
/in/ex2.h:31:8: error: 'value' was not declared in this scope
     if(value[idx]=="B"){
        ^~~~~
/in/ex2.h:39:9: error: 'hex2dex' was not declared in this scope
         hex2dex=hex2dex+value[i]*16^i;
         ^~~~~~~
/in/ex2.h:39:25: error: 'value' was not declared in this scope
         hex2dex=hex2dex+value[i]*16^i;
                         ^~~~~
/in/ex2.h:41:12: error: 'hex2dex' was not declared in this scope
     return hex2dex;
            ^~~~~~~
/in/ex2.h:23:29: error: unused parameter 'head' [-Werror=unused-parameter]
 int hex2decLinkedList(Node *head) {
                             ^~~~
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Final Exam
Language
C++
Submit At
2022-08-02 15:44:06
Judged At
2022-08-06 15:13:10
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes