M
Manuel Maria Diaz Gomez
Hi everybody,
maybe you can give me a hint about the following problem:
I have a simple template class that stores pointers to variables in a map,
and publish the actual values when requested.
template<typename T>
class HighLevelMonitor {
public:
void declareMyVar(string, T*);
void publishAll();
private:
map<string, T*> monVarContainer;
};
In the following implementation, I get a " parse error before = " when
compiling coming form the line:
map<string, T*>::iterator it = monVarContainer.begin();
\*-------------------------------------------------*\
template <typename T>
void HighLevelMonitor<T>:ublishAll()
\*-------------------------------------------------*\
{
cout <<"------------publishAll()------------" << endl;
map<string, T*>::iterator it = monVarContainer.begin();
for(; it != monVarContainer.end(); it++ ){
cout << it->first << " = " << *(it->second) << endl;
}
cout <<"---------------------------------------" << endl;
}
Any clue about why I get this error??
Regards
Manuel
--
========================================================================
Manuel Diaz-Gomez | ATLAS Bldg. 32/SB-008 tel. +41 22 76 76304
CERN EP Division
CH-1211 Geneva 23
SWITZERLAND
========================================================================
maybe you can give me a hint about the following problem:
I have a simple template class that stores pointers to variables in a map,
and publish the actual values when requested.
template<typename T>
class HighLevelMonitor {
public:
void declareMyVar(string, T*);
void publishAll();
private:
map<string, T*> monVarContainer;
};
In the following implementation, I get a " parse error before = " when
compiling coming form the line:
map<string, T*>::iterator it = monVarContainer.begin();
\*-------------------------------------------------*\
template <typename T>
void HighLevelMonitor<T>:ublishAll()
\*-------------------------------------------------*\
{
cout <<"------------publishAll()------------" << endl;
map<string, T*>::iterator it = monVarContainer.begin();
for(; it != monVarContainer.end(); it++ ){
cout << it->first << " = " << *(it->second) << endl;
}
cout <<"---------------------------------------" << endl;
}
Any clue about why I get this error??
Regards
Manuel
--
========================================================================
Manuel Diaz-Gomez | ATLAS Bldg. 32/SB-008 tel. +41 22 76 76304
CERN EP Division
CH-1211 Geneva 23
SWITZERLAND
========================================================================