Quote:
Originally Posted by eng/elsayed
CSketcherDoc::~CSketcherDoc(void)
{
// Delete the element pointed to by each list entry
for(auto iter = m_ElementList.begin() ; iter != m_ElementList.end() ; ++iter)
delete *iter;
m_ElementList.clear(); // Finally delete all pointers
}
the compiler does not accept the keyword auto
i work on vs 2008
what's wrong with that because its repeated lot in the program and i stopped working
|
Hi eng/elsayed!
I am using Visual Studio 10 and I put your code into my project. It says that the auto keyword isn't legal there. In order for the auto keyword to function in it's new role, it needs to be able to deduce from the rest of the statement what the type of the variable is. In this case, it is not able to. I have tried these kind statements before without success. It's sort of a trial and error process for me. I'll try to see if it will work and if it does, I'll start using it in that situation.
Hope this helps!
golfer43
