0

"template argument 2 is invalid"-Error when I declare a list with a home made class

include <list>
using namespace std;

int main() {

    class user
    {
        public: string name, pass;
        int droits;
};
list<user> user_list;

The global message error is Multiple markers at this line - template argument 2 is invalid - trying to instantiate 'template class std::allocator' - template argument for 'template class std::allocator' uses local type 'main()::user' I'm getting started in C++ thanks for your help

Kninnug
  • 7,992
  • 1
  • 30
  • 42
Moses
  • 1
  • 1

0 Answers0