Category talk:C++: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎std namespace: style choice)
Line 4: Line 4:


It'd make things a lot shorter and more readable. [[User:MagiMaster|MagiMaster]] 22:53, 24 May 2011 (UTC)
It'd make things a lot shorter and more readable. [[User:MagiMaster|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]]. --[[User:Mwn3d|Mwn3d]] 03:45, 25 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 the line 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]]. --[[User:Mwn3d|Mwn3d]] 03:45, 25 May 2011 (UTC)

Revision as of 03:46, 25 May 2011

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 the line 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)