STL: accessing a list across files
In STL
Pretty basic but how do I address a list across different cpp files?
in PCEdit.cpp I would have
std::list WeaponList;
How would I access it in another cpp file?
Would I use a reference in an .h file?
ZoomBoy
Developing a iso-tile 2D RPG with skills, weapons, and adventure. See my old Hex-Tile RPG GAME, character editor, diary, 3D Art resources at Check out my web-site
If you are using globals use the
[How To Ask Questions|STL Programmer''s Guide|Bjarne FAQ|C++ FAQ Lite|C++ Reference|MSDN]
extern
keyword. [How To Ask Questions|STL Programmer''s Guide|Bjarne FAQ|C++ FAQ Lite|C++ Reference|MSDN]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement