Some basic problems have been solved, but the "root issue" remains.
That is, I need to populate a structure (i.e. std::map) that contains a
pointer to an integer value that can be changed. For example,
#include <map>
#include <string>
int main()
{
int BNoffset = 42;
map<std::string, int> csvMap2;
map<std::string, int>::iterator csvIt;
csvMap2["BIB"] = BNoffset;
csvMap2["NO."] = BNoffset;
csvIt = csvMap2.find("BIB");
if(csvIt != csvMap2.end())
{
csvIt->second = 17;
}
return;
}
The program starts with "BNoffset" establishing a (default) value.
After I populate the std::map, I will need to change that variable's
value - to something I calculate. My dilemma is that I can't declare
the map object's type (I want pass-by-reference?) during
execution...because I can't find a way to declare and use the object's
"second" component. The code compiles, but it doesn't alter the
_contents_ of "BNoffset", which is my goal.
In essence, I don't know how to declare and use pointer addressing in
the way I want. Is it possible? If so, please explain how. TIA
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus