Category talk:C++

From Rosetta Code
Revision as of 03:45, 25 May 2011 by rosettacode>Mwn3d (→‎std namespace: style choice)

std namespace

Is there some reason none of the code examples include the line: <lang C++>using namespace std;</lang>

It'd make things a lot shorter and more readable. MagiMaster 22:53, 24 May 2011 (UTC)

It's a simple style choice. Some people like to be explicit in case other namespaces have similarly named functions. You can add them for new examples but I don't think it's worth it to change the other ones. You could also try to organize the C++ community a la J/HouseStyle. --Mwn3d 03:45, 25 May 2011 (UTC)