Record Detail

Compile Error

/in/compress.cpp:51:5: error: use of undeclared identifier 'vector'
    vector<pair<char, int>> charCount; // char and its count
    ^
/in/compress.cpp:51:27: error: expected '(' for function-style cast or type construction
    vector<pair<char, int>> charCount; // char and its count
           ~~~~~~~~~~~~~~~^
/in/compress.cpp:51:29: error: use of undeclared identifier 'charCount'
    vector<pair<char, int>> charCount; // char and its count
                            ^
/in/compress.cpp:55:27: error: use of undeclared identifier 'charCount'
        auto it = find_if(charCount.begin(), charCount.end(), [&](const pair<char, int> &elem)
                          ^
/in/compress.cpp:55:46: error: use of undeclared identifier 'charCount'
        auto it = find_if(charCount.begin(), charCount.end(), [&](const pair<char, int> &elem)
                                             ^
/in/compress.cpp:57:19: error: use of undeclared identifier 'charCount'
        if (it != charCount.end())
                  ^
/in/compress.cpp:63:13: error: use of undeclared identifier 'charCount'
            charCount.push_back(make_pair(ch, 1));
            ^
/in/compress.cpp:67:10: error: use of undeclared identifier 'charCount'
    sort(charCount.begin(), charCount.end(), [](const pair<char, int> &left, const pair<char, int> &right)
         ^
/in/compress.cpp:67:29: error: use of undeclared identifier 'charCount'
    sort(charCount.begin(), charCount.end(), [](const pair<char, int> &left, const pair<char, int> &right)
                            ^
/in/compress.cpp:73:5: error: use of undeclared identifier 'vector'
    vector<Node *> pq;
    ^
/in/compress.cpp:73:12: error: 'Node' does not refer to a value
    vector<Node *> pq;
           ^
/in/binaryTree.h:6:7: note: declared here
class Node
      ^
/in/compress.cpp:73:18: error: expected expression
    vector<Node *> pq;
                 ^
/in/compress.cpp:73:20: error: use of undeclared identifier 'pq'
    vector<Node *> pq;
                   ^
/in/compress.cpp:75:27: error: use of undeclared identifier 'charCount'
    for (const auto &it : charCount)
                          ^
/in/compress.cpp:79:9: error: use of undeclared identifier 'pq'
        pq.push_back(node);
        ^
/in/compress.cpp:82:12: error: use of undeclared identifier 'pq'
    while (pq.size() > 1)
           ^
/in/compress.cpp:84:22: error: use of undeclared identifier 'pq'
        auto right = pq.back();
                     ^
/in/compress.cpp:85:9: error: use of undeclared identifier 'pq'
        pq.pop_back();
        ^
/in/compress.cpp:86:21: error: use of undeclared identifier 'pq'
        auto left = pq.back();
                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
/in/Compile/Makefile:27: recipe for target 'test_com' failed
make: *** [test_com] Error 1

Information

Submit By
Type
Submission
Homework
Project 4
Language
C++
Submit At
2023-07-05 12:34:02
Judged At
2023-07-05 12:34:02
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes