c++ stl: enclosing difficulty reuse after clearing?


in programming face several situations where mandatory middle stl containers following instance depicts:



while(true)
{
set < int > tempset;

(int i = 0; i < n; i ++)
{
(m.size() == min && m.size() <= max)
{
tempset.insert(i);
}
}
//some condition contrast code
}


or



set < int > tempset;

while(true)
{
(int i = 0; i < n; i ++)
{
(m.size() == min && m.size() <= max)
{
tempset.insert(i);
}
}
tempset.clear();

//some condition contrast code
}


which proceed improved terms space complexity deliberation donation state c++ compliers?



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?