Talk:Input/output (C++)
This is the talk page for discussing improvements to the Input/output (C++) article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||
|
Text and/or other creative content from this version of Ios (C++) was copied or moved into Input/output (C++) with this edit. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
Text and/or other creative content from this version of Iostream was copied or moved into Input/output (C++) with this edit. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
Text and/or other creative content from this version of Sstream was copied or moved into Input/output (C++) with this edit. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
Text and/or other creative content from this version of Fstream was copied or moved into Input/output (C++) with this edit. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
Not appropriate for wiki
[edit]I would point my companions to http://wiki.riteme.site/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?
[edit]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
[edit]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
[edit]iostream.h redirects here, but the article does not explicitly mention the original and now deprecated header file <iostream.h> and difference between that and <iostream>. I think it is important, because these two are not the same and should never be used interchangeably (in the packages that even provide iostream.h anymore). —Preceding unsigned comment added by 192.198.152.98 (talk) 09:46, 12 February 2008 (UTC)
- 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
[edit]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. Incstdio
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
[edit]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
[edit]In the article there only output examples — Preceding unsigned comment added by 88.27.101.121 (talk) 15:52, 29 September 2011 (UTC)