You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2005/11/11 19:26:07 UTC
svn commit: r332628 -
/incubator/stdcxx/trunk/examples/manual/stringstream.cpp
Author: sebor
Date: Fri Nov 11 10:26:02 2005
New Revision: 332628
URL: http://svn.apache.org/viewcvs?rev=332628&view=rev
Log:
2005-11-11 Martin Sebor <se...@roguewave.com>
* stringstream.cpp: Replaced uses of std::endl with '\n' for efficiency.
Modified:
incubator/stdcxx/trunk/examples/manual/stringstream.cpp
Modified: incubator/stdcxx/trunk/examples/manual/stringstream.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/examples/manual/stringstream.cpp?rev=332628&r1=332627&r2=332628&view=diff
==============================================================================
--- incubator/stdcxx/trunk/examples/manual/stringstream.cpp (original)
+++ incubator/stdcxx/trunk/examples/manual/stringstream.cpp Fri Nov 11 10:26:02 2005
@@ -2,7 +2,7 @@
*
* stringstream.cpp - stringstream example.
*
- * $Id: //stdlib/dev/examples/stdlib/manual/stringstream.cpp#12 $
+ * $Id$
*
***************************************************************************
*
@@ -19,7 +19,7 @@
*
**************************************************************************/
-#include <iostream> // for wcout, endl
+#include <iostream> // for wcout
#include <sstream> // for wstringstream
#include <examples.h>
@@ -33,7 +33,7 @@
// write out three lines to the stream
inout << "Dieses ist die Geschichte eines Mannes.\n"
<< "C'est l'histoire d'un homme.\n"
- << "This is the story of a man." << std::endl;
+ << "This is the story of a man.\n";
std::wstring line;
@@ -53,10 +53,10 @@
std::getline (inout, line);
// output the third line to stdout
- std::wcout << "\nEnglish:\n" << line << std::endl;
+ std::wcout << "\nEnglish:\n" << line << "\n\n";
// output the contents of the stream object to stdout
- std::wcout << std::endl << inout.str() << std::endl;
+ std::wcout << inout.str () << '\n';
return 0;
}