J
jschon
Hi,
I'm trying to write a thread safe hash map class. Basically I have put
some packaging around the STL map class to ensure thread safe access.
The container is a templated class.
I'm having trouble with a line of code:
map<string, T*>::iterator all_it = all.begin();
when i compile it i get the error:
objectcontainer.cpp:127: error: expected `;' before "all_it"
however if i change the line of code to:
map<string, int*>::iterator all_it = all.begin();
the error completely goes away.
the function this code snippet is in is defined as such:
template <class T>
void ObjectContainer<T>::copy(const ObjectContainer<T>& o){
---body---
}
if anybody knows what I am doing incorrectly I would be very much
obliged if you could let me know, or give me some tips. I'm VERY stuck
here.
Thanks!,
Jake
I'm trying to write a thread safe hash map class. Basically I have put
some packaging around the STL map class to ensure thread safe access.
The container is a templated class.
I'm having trouble with a line of code:
map<string, T*>::iterator all_it = all.begin();
when i compile it i get the error:
objectcontainer.cpp:127: error: expected `;' before "all_it"
however if i change the line of code to:
map<string, int*>::iterator all_it = all.begin();
the error completely goes away.
the function this code snippet is in is defined as such:
template <class T>
void ObjectContainer<T>::copy(const ObjectContainer<T>& o){
---body---
}
if anybody knows what I am doing incorrectly I would be very much
obliged if you could let me know, or give me some tips. I'm VERY stuck
here.
Thanks!,
Jake