Talk:Input/output (C++)
{{Talk header}}
{{WikiProject banner shell|class=Start|
{{WikiProject Computing|importance=Low}}
{{WikiProject C/C++|importance=Mid|c++=yes}}
}}
{{Copied |from=Ios (C++) |from_oldid=471141575 |to=Input/output (C++) |diff=https://en.wikipedia.org/w/index.php?title=Input/output_(C%2B%2B)&diff=484823240&oldid=484823182 }}
{{Copied |from=Iostream |from_oldid=483288242 |to=Input/output (C++) |diff=https://en.wikipedia.org/w/index.php?title=Input/output_(C%2B%2B)&diff=484823240&oldid=484823182 }}
{{Copied |from=Sstream |from_oldid=460582190 |to=Input/output (C++) |diff=https://en.wikipedia.org/w/index.php?title=Input/output_%28C%2B%2B%29&oldid=484823148 }}
{{Copied |from=Fstream |from_oldid=476351111 |to=Input/output (C++) |diff=https://en.wikipedia.org/w/index.php?title=Input/output_(C%2B%2B)&diff=484824312&oldid=484824098 }}
Not appropriate for wiki
I would point my companions to
http://en.wikipedia.org/wiki/Wikipedia:What_Wikipedia_is_not#Wikipedia_is_not_a_manual.2C_guidebook.2C_textbook.2C_or_scientific_journal about how we don't need to basically post documentation for the C++ libraries.
71.193.202.254 (talk) 05:36, 24 February 2015 (UTC)
No Sources?
Exactly what content does anyone think requires a source here? I sourced my work, but what was here before isn't explicitly sourced. However I think that its pretty easily found anywhere. My opinion is that if you want a source for "iostream is a header file " or "The cout object is of type ostream," then look for it yourself. Fresheneesz 21:52, 18 August 2006 (UTC)
:The source for half the article is the C++ standard, as published by ISO. If someone needs page numbers, he should find a Wikipedia editor with a copy of the standard. --Damian Yerrick (talk | stalk) 20:28, 24 May 2008 (UTC)
Standard library box Lacking
Why is only the STL Map mentioned in the standard library box? Surely it should either be ALL the STL containers or a link to the STL containers page? In fact that box is really looking a bit slim.. . :/
iostream and iostream.h
iostream.h redirects here, but the article does not explicitly mention the original and now deprecated header file
:This is important. It also needs mentioning why use of iostream.h would therefore not need the std:: declarations Thedarxide (talk) 21:51, 10 February 2009 (UTC)
iostream and GNU
I just wrote a set of hello world programs to test just how large the difference is between C and C++. While it does favour C, this is not because GCC cannot remove non-reachable code -- in fact that is what GCC does well. The reason for the slightly (i.e. not orders of magnitude) larger binary C++ program is due to cout and family begin implemented using the C stdio library by default. This can be reversed meaning that the little overhead introduced by using this technique is reduced quite a bit. —Preceding unsigned comment added by FrederikHertzum (talk • contribs) 19:03, 24 May 2008 (UTC)
:So why, when I compile and statically link a Hello World that uses libstdc++ iostream
, do I get date, time, and money functions added into my executable? It turns out it has less to do with GCC than with the GNU libstdc++ commonly distributed with GCC. Anybody who has the GNU libstdc++ source code can verify that the constructor for cout's class calls locale-related methods, even if the class's locale fields never get used. In cstdio
implementations, on the other hand, FILE * objects don't have locale baggage. --Damian Yerrick (talk | stalk) 22:03, 24 May 2008 (UTC)
Extraneous sample program
It seems that having two hello world programs in the lead is excessive for an article on the iostream system. While the canonical C++ "hello world" has been an all consuming discussion topic on Talk:C++ (with the consensus being that Stroustrup's version is the proper one to use for the example), it seems that this one might be a useful place to show off some of the other features of the standard library and discussion of the difference between "\n" and std::endl can be moved into a sub-section rather than the lead. -- Autopilot (talk) 00:24, 19 January 2010 (UTC)
Samples should be portable where possible. "\n" ist not portable. std::endl is portable. There is a world outside Linux.... - -Sebi2020 (talk) 15:52, 23 May 2017 (UTC) Sebi2020 (talk) 15:52, 23 May 2017 (UTC)
:And in the world outside Linux std::cout << "\n"
works just as well as it does in Linux, because text-mode streams do newline translation. So there is no portability problem. --Zundark (talk) 12:35, 24 May 2017 (UTC)
input
In the article there only output examples — Preceding unsigned comment added by 88.27.101.121 (talk) 15:52, 29 September 2011 (UTC)