Record Detail

Compile Error

/in/bank.cpp:71:1: error: 'unordered_map' does not name a type
 unordered_map<string, User> users;
 ^~~~~~~~~~~~~
/in/bank.cpp: In function 'void loadUsers(const string&)':
/in/bank.cpp:270:9: error: 'users' was not declared in this scope
         users[userId] = user;
         ^~~~~
/in/bank.cpp:270:9: note: suggested alternative: 'user'
         users[userId] = user;
         ^~~~~
         user
/in/bank.cpp: In function 'void processCommands()':
/in/bank.cpp:291:17: error: 'users' was not declared in this scope
             if (users.find(userId) != users.end() && users[userId].pin == pin)
                 ^~~~~
/in/bank.cpp:291:17: note: suggested alternative: 'userId'
             if (users.find(userId) != users.end() && users[userId].pin == pin)
                 ^~~~~
                 userId
/in/bank.cpp:313:17: error: 'users' was not declared in this scope
             if (users[userId].validIPs.find(ip) == users[userId].validIPs.end() || users[userId].validIPs.empty())
                 ^~~~~
/in/bank.cpp:313:17: note: suggested alternative: 'userId'
             if (users[userId].validIPs.find(ip) == users[userId].validIPs.end() || users[userId].validIPs.empty())
                 ^~~~~
                 userId
/in/bank.cpp:355:17: error: 'users' was not declared in this scope
             if (users.find(t.senderId) == users.end())
                 ^~~~~
/in/bank.cpp:355:17: note: suggested alternative: 'User'
             if (users.find(t.senderId) == users.end())
                 ^~~~~
                 User
/in/bank.cpp:363:17: error: 'users' was not declared in this scope
             if (users.find(t.recipientId) == users.end())
                 ^~~~~
/in/bank.cpp:363:17: note: suggested alternative: 'User'
             if (users.find(t.recipientId) == users.end())
                 ^~~~~
                 User
/in/bank.cpp:371:31: error: 'users' was not declared in this scope
             if (t.timestamp < users[t.senderId].regTime || t.timestamp < users[t.recipientId].regTime)
                               ^~~~~
/in/bank.cpp:371:31: note: suggested alternative: 'User'
             if (t.timestamp < users[t.senderId].regTime || t.timestamp < users[t.recipientId].regTime)
                               ^~~~~
                               User
/in/bank.cpp:379:17: error: 'users' was not declared in this scope
             if (users[t.senderId].validIPs.empty())
                 ^~~~~
/in/bank.cpp:379:17: note: suggested alternative: 'User'
             if (users[t.senderId].validIPs.empty())
                 ^~~~~
                 User
/in/bank.cpp:387:17: error: 'users' was not declared in this scope
             if (users[t.senderId].validIPs.find(t.IP) == users[t.senderId].validIPs.end())
                 ^~~~~
/in/bank.cpp:387:17: note: suggested alternative: 'User'
             if (users[t.senderId].validIPs.find(t.IP) == users[t.senderId].validIPs.end())
                 ^~~~~
                 User
/in/bank.cpp:411:17: error: 'users' was not declared in this scope
             if (users[t.senderId].regTime < t.execDate - 50000000000)
                 ^~~~~
/in/bank.cpp:411:17: note: suggested alternative: 'User'
             if (users[t.senderId].regTime < t.execDate - 50000000000)
                 ^~~~~
                 User
/in/bank.cpp: In function 'void executeTransaction()':
/in/bank.cpp:436:20: error: 'users' was not declared in this scope
     User &sender = users[t.senderId];
                    ^~~~~
/in/bank.cpp:436:20: note: suggested alternative: 'User'
     User &sender = users[t.senderId];
                    ^~~~~
                    User
/in/bank.cpp: In function 'void handleQueries()':
/in/bank.cpp:509:17: error: 'users' was not declared in this scope
             if (users.find(userId) == users.end())
                 ^~~~~
/in/bank.cpp:509:17: note: suggested alternative: 'userId'
             if (users.find(userId) == users.end())
                 ^~~~~
                 userId

Information

Submit By
Type
Submission
Homework
Project Tests
Language
GNU Make
Submit At
2023-11-12 04:21:39
Judged At
2023-11-12 04:21:39
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes