//TreeBox.h
#pragma once
#include "ListBox.h"
struct ItemInfo
{
std::string _fileName;
std::string _childName;
std::string _time;
std::string _format;
std::string _size;
std::string _nodeKey;
};
class TreeBox
{
...
}
//ListBox.h
class
{
public:
std::vector<ItemInfo> _itemList; //compile error
}
I wanna use std::vector in "ListBox.h" from using struct in "TreeBox.h" but it was compile error allocator C2903
how do I use that?
Simply add
#include <vector>to the top of your header to include the STL vector. #including a file header at the top of a file allows you to access the objects defined in that header.