<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[std::iwas iwas(); oder std::iwas iwas; ?]]></title><description><![CDATA[<p>Als ich gerade bei Dev C++ für den code eine Fehlermeldung bekommen habe</p>
<pre><code class="language-cpp">std::ifstream blub;  // incomplete type, cant be defined
</code></pre>
<p>und ich zu</p>
<pre><code class="language-cpp">std::ifstream blub();
</code></pre>
<p>gezwungen wurde, dachte ich es liegt an dem hohen Alter der IDE. Aber Code::Blocks verlangte dasselbe.<br />
Das kann aber doch garnicht richtig sein? Das würde schliesslich einer Funktionsdeklaration gleichkommen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/299279/std-iwas-iwas-oder-std-iwas-iwas</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 10:01:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/299279.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Feb 2012 13:25:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::iwas iwas(); oder std::iwas iwas; ? on Tue, 07 Feb 2012 13:25:39 GMT]]></title><description><![CDATA[<p>Als ich gerade bei Dev C++ für den code eine Fehlermeldung bekommen habe</p>
<pre><code class="language-cpp">std::ifstream blub;  // incomplete type, cant be defined
</code></pre>
<p>und ich zu</p>
<pre><code class="language-cpp">std::ifstream blub();
</code></pre>
<p>gezwungen wurde, dachte ich es liegt an dem hohen Alter der IDE. Aber Code::Blocks verlangte dasselbe.<br />
Das kann aber doch garnicht richtig sein? Das würde schliesslich einer Funktionsdeklaration gleichkommen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2177994</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2177994</guid><dc:creator><![CDATA[WhatsThis]]></dc:creator><pubDate>Tue, 07 Feb 2012 13:25:39 GMT</pubDate></item><item><title><![CDATA[Reply to std::iwas iwas(); oder std::iwas iwas; ? on Tue, 07 Feb 2012 13:30:20 GMT]]></title><description><![CDATA[<p>Zweiteres kommt nicht nur einer Funktionsdeklaration gleich, es <strong>ist</strong> eine. Da man Funktionen bereits deklarieren kann, wenn ein Typ noch nicht vollständig bekannt ist, gehe ich mal davon aus, dass Du #include &lt;fstream&gt; vergessen hast?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2177997</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2177997</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Tue, 07 Feb 2012 13:30:20 GMT</pubDate></item><item><title><![CDATA[Reply to std::iwas iwas(); oder std::iwas iwas; ? on Tue, 07 Feb 2012 13:41:54 GMT]]></title><description><![CDATA[<p>Achja, wie dumm. Ich dachte mit iostream würde ich alle Arten von In und Output streams abdecken, auch die filestreams ;O</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2178006</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2178006</guid><dc:creator><![CDATA[WhatsThis]]></dc:creator><pubDate>Tue, 07 Feb 2012 13:41:54 GMT</pubDate></item><item><title><![CDATA[Reply to std::iwas iwas(); oder std::iwas iwas; ? on Tue, 07 Feb 2012 13:49:00 GMT]]></title><description><![CDATA[<p>WhatsThis schrieb:</p>
<blockquote>
<p>Achja, wie dumm. Ich dachte mit iostream würde ich alle Arten von In und Output streams abdecken, auch die filestreams ;O</p>
</blockquote>
<p>iostream ist (in C++11) äquivalent zu:</p>
<pre><code class="language-cpp">#include &lt;ios&gt;
#include &lt;streambuf&gt;
#include &lt;istream&gt;
#include &lt;ostream&gt;

namespace std {
 extern istream cin
 extern ostream cout
 extern ostream cerr
 extern ostream clog
 extern wistream wcin
 extern wostream wcout
 extern wostream wcerr
 extern wostream wclog
}
</code></pre>
<p>Darf natürlich auch mehr machen, kann man sich aber nicht drauf verlassen und wird es in der Regel aber auch nicht. In C++98 ist die Definition etwas unklarer, läuft aber effektiv auf das selbe hinaus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2178014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2178014</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 07 Feb 2012 13:49:00 GMT</pubDate></item><item><title><![CDATA[Reply to std::iwas iwas(); oder std::iwas iwas; ? on Tue, 07 Feb 2012 15:30:46 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>WhatsThis schrieb:</p>
<blockquote>
<p>Achja, wie dumm. Ich dachte mit iostream würde ich alle Arten von In und Output streams abdecken, auch die filestreams ;O</p>
</blockquote>
<p>iostream ist (in C++11) äquivalent zu:</p>
<pre><code class="language-cpp">#include &lt;ios&gt;
#include &lt;streambuf&gt;
#include &lt;istream&gt;
#include &lt;ostream&gt;

namespace std {
 extern istream cin
 extern ostream cout
 extern ostream cerr
 extern ostream clog
 extern wistream wcin
 extern wostream wcout
 extern wostream wcerr
 extern wostream wclog
}
</code></pre>
<p>Darf natürlich auch mehr machen, kann man sich aber nicht drauf verlassen und wird es in der Regel aber auch nicht. In C++98 ist die Definition etwas unklarer, läuft aber effektiv auf das selbe hinaus.</p>
</blockquote>
<p>Muss man in C++11 jetzt keine Semikolons mehr hinter Variablendeklarationen schreiben? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2178084</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2178084</guid><dc:creator><![CDATA[wxSkip]]></dc:creator><pubDate>Tue, 07 Feb 2012 15:30:46 GMT</pubDate></item><item><title><![CDATA[Reply to std::iwas iwas(); oder std::iwas iwas; ? on Tue, 07 Feb 2012 18:02:39 GMT]]></title><description><![CDATA[<p>Oder include-guards? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Edit: BTW, So sieht es bei GCC 4.7 aus (Kommentare rausgeschnitten):</p>
<pre><code class="language-cpp">#ifndef _GLIBCXX_IOSTREAM
#define _GLIBCXX_IOSTREAM 1

#pragma GCC system_header

#include &lt;bits/c++config.h&gt;
#include &lt;ostream&gt;
#include &lt;istream&gt;

namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  extern istream cin;		/// Linked to standard input
  extern ostream cout;		/// Linked to standard output
  extern ostream cerr;		/// Linked to standard error (unbuffered)
  extern ostream clog;		/// Linked to standard error (buffered)

#ifdef _GLIBCXX_USE_WCHAR_T
  extern wistream wcin;		/// Linked to standard input
  extern wostream wcout;	/// Linked to standard output
  extern wostream wcerr;	/// Linked to standard error (unbuffered)
  extern wostream wclog;	/// Linked to standard error (buffered)
#endif

  static ios_base::Init __ioinit;

_GLIBCXX_END_NAMESPACE_VERSION
}

#endif /* _GLIBCXX_IOSTREAM */
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> Wo sind streambuf und ios?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2178158</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2178158</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 07 Feb 2012 18:02:39 GMT</pubDate></item><item><title><![CDATA[Reply to std::iwas iwas(); oder std::iwas iwas; ? on Tue, 07 Feb 2012 18:31:45 GMT]]></title><description><![CDATA[<p>die kommen über ostream/istream rein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2178171</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2178171</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Tue, 07 Feb 2012 18:31:45 GMT</pubDate></item></channel></rss>