C++ vector issue - 'LNK2001: unresolved external symbol private: static…'

前端 未结 3 1054
眼角桃花
眼角桃花 2021-02-05 09:45

Before anyone calls me out for not looking at pre-existing questions, I have looked and realise that it is to do with declaration, but I still can\'t get it to work (might be so

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-05 09:58

    You have to define them in the .cpp file:

    vector Manager::flights;
    vector Manager::airports;
    

提交回复
热议问题