#map errors

8 messages · Page 1 of 1 (latest)

fathom garden
#
#pragma once
#include <string>
#include <vector>
namespace SYSTEM
{
    class System
    {
        public:
            std::string id;
            std::set<std::string> neighboringSystems;
            std::vector<std::string> asteroidsResourceIds;
            bool canBuySkips;
            bool canDirectSell;
            int allFleetsCount = 0;
            std::map<std::string, std::vector<FLEET::Fleet>> players;
            std::map<std::string, std::vector<SYSTEM::MarketItem>> marketSellOffers;
            std::map<std::string, std::vector<SYSTEM::MarketItem>> marketBuyOffers;
    };

    struct MarketItem
    {
        int quantity;
        int price;
    };
}

im getting a bunch of errors about these map variables.
For example it says that MarketItem is not a member of SYSTEM
what am i doing wrong here?

fading ginkgoBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

iron gale
#

also you don't need to prefix it with SYSTEM:: because you are already inside the same namespace

fathom garden
#

!solved

fading ginkgoBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity

iron gale