Record Detail

Compile Error

/in/call.cpp:16:5: error: use of undeclared identifier 'cin'; did you mean 'min'?
    cin>>event_num;
    ^~~
    min
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: 'min' declared here
    min(const _Tp& __a, const _Tp& __b)
    ^
/in/call.cpp:16:5: error: reference to overloaded function could not be resolved; did you mean to call it?
    cin>>event_num;
    ^~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: possible target for call
    min(const _Tp& __a, const _Tp& __b)
    ^
/in/call.cpp:19:18: error: variable length arrays are a C99 feature [-Werror,-Wvla-extension]
    client events[event_num-1];
                 ^
/in/call.cpp:22:13: error: use of undeclared identifier 'cin'; did you mean 'min'?
            cin >> events[i].timestamp;
            ^~~
            min
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: 'min' declared here
    min(const _Tp& __a, const _Tp& __b)
    ^
/in/call.cpp:22:13: error: reference to overloaded function could not be resolved; did you mean to call it?
            cin >> events[i].timestamp;
            ^~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: possible target for call
    min(const _Tp& __a, const _Tp& __b)
    ^
/in/call.cpp:23:13: error: use of undeclared identifier 'cin'; did you mean 'min'?
            cin >> events[i].name;
            ^~~
            min
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: 'min' declared here
    min(const _Tp& __a, const _Tp& __b)
    ^
/in/call.cpp:23:13: error: reference to overloaded function could not be resolved; did you mean to call it?
            cin >> events[i].name;
            ^~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: possible target for call
    min(const _Tp& __a, const _Tp& __b)
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/basic_string.h:6271:5: note: candidate function [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>] not viable: no overload of 'min' matching 'basic_istream<char> &' for 1st argument
    operator>>(basic_istream<char>& __is, basic_string<char>& __str);
    ^
/in/call.cpp:24:13: error: use of undeclared identifier 'cin'; did you mean 'min'?
            cin >> events[i].status;
            ^~~
            min
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: 'min' declared here
    min(const _Tp& __a, const _Tp& __b)
    ^
/in/call.cpp:24:13: error: reference to overloaded function could not be resolved; did you mean to call it?
            cin >> events[i].status;
            ^~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: possible target for call
    min(const _Tp& __a, const _Tp& __b)
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/basic_string.h:6271:5: note: candidate function [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>] not viable: no overload of 'min' matching 'basic_istream<char> &' for 1st argument
    operator>>(basic_istream<char>& __is, basic_string<char>& __str);
    ^
/in/call.cpp:25:13: error: use of undeclared identifier 'cin'; did you mean 'min'?
            cin >> events[i].duration;
            ^~~
            min
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: 'min' declared here
    min(const _Tp& __a, const _Tp& __b)
    ^
/in/call.cpp:25:13: error: reference to overloaded function could not be resolved; did you mean to call it?
            cin >> events[i].duration;
            ^~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:195:5: note: possible target for call
    min(const _Tp& __a, const _Tp& __b)
    ^
/in/call.cpp:34:14: error: no member named 'cout' in namespace 'std'
        std::cout << "Starting tick #"<<tick<<std::endl;
        ~~~~~^
/in/call.cpp:34:52: error: no member named 'endl' in namespace 'std'
        std::cout << "Starting tick #"<<tick<<std::endl;
                                              ~~~~~^
/in/call.cpp:38:22: error: no member named 'cout' in namespace 'std'
                std::cout << "Call from "<< events[i].name<<" a "<<events[i].status<<" member"<<std::endl;
                ~~~~~^
/in/call.cpp:38:102: error: no member named 'endl' in namespace 'std'
                std::cout << "Call from "<< events[i].name<<" a "<<events[i].status<<" member"<<std::endl;
                                                                                                ~~~~~^
/in/call.cpp:49:26: error: no member named 'cout' in namespace 'std'
                    std::cout << "wrong status!"<<std::endl;
                    ~~~~~^
/in/call.cpp:49:56: error: no member named 'endl' in namespace 'std'
                    std::cout << "wrong status!"<<std::endl;
                                                  ~~~~~^
/in/call.cpp:71:26: error: no member named 'cout' in namespace 'std'
                    std::cout << "Answering call from "<< victim->name <<std::endl;
                    ~~~~~^
/in/call.cpp:71:79: error: no member named 'endl' in namespace 'std'
                    std::cout << "Answering call from "<< victim->name <<std::endl;
                                                                         ~~~~~^
19 errors generated.
/in/Compile/Makefile:39: recipe for target 'buildCall' failed
make: *** [buildCall] Error 1

Information

Submit By
Type
Submission
Homework
Project 5
Language
C++
Submit At
2022-12-05 12:29:29
Judged At
2022-12-05 12:29:29
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes