There seem to be different views on using \'using\' with respect to the std namespace.
Some say use \' using namespace std
\', other say don\'t but rathe
For me, I prefer to use ::
when possible.
std::list iList;
I hate to write :
for(std::list::iterator i = iList.begin(); i != iList.end(); i++)
{
//
}
Hopefully, with C++0x I would write this:
for(auto i = iList.begin(); i != iList.end(); i++)
{
//
}
If the namespace is very lengthy,
namespace dir = boost::filesystem;
dir::directory_iterator file("e:/boost");
dir::directory_iterator end;
for( ; file != end; file++)
{
if(dir::is_directory(*file))
std::cout << *file << std::endl;
}