<?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[Probleme mit Iomanip]]></title><description><![CDATA[<p>Hallo.<br />
Hier direkt mal mein Code:</p>
<pre><code class="language-cpp">void SizeOf()
{
	cout.setf(ios::fixed,ios::adjustfield);
	cout
		&lt;&lt; &quot; Belegter Speicher in Bit: \n&quot;
		&lt;&lt; &quot;\Bool:  \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(bool) 
		&lt;&lt; &quot;\nChar: \n &quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(char) 
		&lt;&lt; &quot;\nInt: \n &quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(int) 
		&lt;&lt; &quot;\nDouble: \n &quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(double)
		&lt;&lt; &quot;\nlong: \n &quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(long)
		&lt;&lt; &quot;\nlong Double:  \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(long double)
		&lt;&lt; endl;
</code></pre>
<p>Trotz setw(15) wird jede zeile ein Stückchen verschoben ausgegeben. &lt;&lt;right führt bei mir zu keinem Ergebniss.<br />
Wie bekomme ich die SizeOf's genau in eine Spalte?</p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/284331/probleme-mit-iomanip</link><generator>RSS for Node</generator><lastBuildDate>Sat, 22 Aug 2026 03:21:42 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/284331.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Mar 2011 11:37:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 11:37:34 GMT]]></title><description><![CDATA[<p>Hallo.<br />
Hier direkt mal mein Code:</p>
<pre><code class="language-cpp">void SizeOf()
{
	cout.setf(ios::fixed,ios::adjustfield);
	cout
		&lt;&lt; &quot; Belegter Speicher in Bit: \n&quot;
		&lt;&lt; &quot;\Bool:  \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(bool) 
		&lt;&lt; &quot;\nChar: \n &quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(char) 
		&lt;&lt; &quot;\nInt: \n &quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(int) 
		&lt;&lt; &quot;\nDouble: \n &quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(double)
		&lt;&lt; &quot;\nlong: \n &quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(long)
		&lt;&lt; &quot;\nlong Double:  \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(long double)
		&lt;&lt; endl;
</code></pre>
<p>Trotz setw(15) wird jede zeile ein Stückchen verschoben ausgegeben. &lt;&lt;right führt bei mir zu keinem Ergebniss.<br />
Wie bekomme ich die SizeOf's genau in eine Spalte?</p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042254</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042254</guid><dc:creator><![CDATA[Hänselchen]]></dc:creator><pubDate>Wed, 30 Mar 2011 11:37:34 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 11:44:38 GMT]]></title><description><![CDATA[<p>Du hast hinter manchen \n noch ein Leerzeichen in der Ausgabe, hinter anderen nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042257</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042257</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 30 Mar 2011 11:44:38 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 11:45:19 GMT]]></title><description><![CDATA[<p>Ist ja auch klar da deine Ausgaben unterschiedlich lange sind.<br />
Da musste ein bisschen rumrechnen oder dir ne Funktion basteln. Aber kann sein dass es auch noch andere Möglichkeiten gibt.</p>
<p>Lg freeG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042258</guid><dc:creator><![CDATA[fr33g]]></dc:creator><pubDate>Wed, 30 Mar 2011 11:45:19 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 11:48:44 GMT]]></title><description><![CDATA[<p>Das ist Unfug.</p>
<p>Beispiel aus Deinem Code:</p>
<pre><code class="language-cpp">&lt;&lt; &quot;\Bool:  \n&quot;
&lt;&lt;setw(15)&lt;&lt;sizeof(bool)
&lt;&lt; &quot;\nChar: \n &quot;
&lt;&lt;setw(15)&lt;&lt;sizeof(char)
</code></pre>
<p>Hier wird nach 'Bool:' eine neue Zeile begonnen und 15 stellig sizeof(bool) ausgegeben, dann wird 'Char: ' ausgegeben, eine neue Zeile begonnen, als erstes ein Leerzeichen in die neue Zeile geschrieben, dann 15 stellig sizeof(char) ausgegeben, deshalb hat diese Zeile 16 Stellen und nicht 15, wie die erste, usw.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042261</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042261</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 30 Mar 2011 11:48:44 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 11:50:12 GMT]]></title><description><![CDATA[<p>Danke sehr!</p>
<p>Aber wie bekomme ich denn mit setw (oder anderen flags) hin, dass die Bitzahlen in einer Reihe mit der oberen Zeile stehen?</p>
<p>also:</p>
<p>Int: 2</p>
<p>da kann ich machen was ich will, da hüpft jede Bitzahl wo anders rum...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042262</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042262</guid><dc:creator><![CDATA[Hänselchen]]></dc:creator><pubDate>Wed, 30 Mar 2011 11:50:12 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 12:01:33 GMT]]></title><description><![CDATA[<p>Ich verstehe Deine Frage nicht.<br />
Mit:</p>
<pre><code class="language-cpp">void SizeOf()
{

	cout
		&lt;&lt; &quot; Belegter Speicher in Bit: \n&quot;
		&lt;&lt; &quot;\Bool:  \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(bool) 
		&lt;&lt; &quot;\nChar: \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(char) 
		&lt;&lt; &quot;\nInt: \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(int) 
		&lt;&lt; &quot;\nDouble: \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(double)
		&lt;&lt; &quot;\nlong: \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(long)
		&lt;&lt; &quot;\nlong Double:  \n&quot;
		&lt;&lt;setw(15)&lt;&lt;sizeof(long double)
		&lt;&lt; endl;
</code></pre>
<p>sollten alle Zahlen untereinander stehen. Es muss übrigens 'Byte' und nicht 'Bit' heißen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042270</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042270</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 30 Mar 2011 12:01:33 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Tue, 22 Nov 2011 14:28:49 GMT]]></title><description><![CDATA[<p>Meinst du so?</p>
<pre><code class="language-cpp">void SizeOf()
{
    cout &lt;&lt; setw(10) &lt;&lt; &quot;Belegter Speicher in Bytes: &lt;&lt; '\n'
         &lt;&lt; setw(10) &lt;&lt; &quot;bool = &quot;   &lt;&lt; sizeof(bool)  &lt;&lt; '\n'
         &lt;&lt; setw(10) &lt;&lt; &quot;char = &quot;   &lt;&lt; sizeof(char)  &lt;&lt; '\n'
         &lt;&lt; setw(10) &lt;&lt; &quot;int = &quot;    &lt;&lt; sizeof(int)   &lt;&lt; '\n'
         &lt;&lt; setw(10) &lt;&lt; &quot;float = &quot;  &lt;&lt; sizeof(float) &lt;&lt; '\n'
         &lt;&lt; setw(10) &lt;&lt; &quot;double = &quot; &lt;&lt; sizeof(double);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2042274</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042274</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 22 Nov 2011 14:28:49 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 12:39:04 GMT]]></title><description><![CDATA[<p>Belli schrieb:</p>
<blockquote>
<p>Das ist Unfug.</p>
<p>Beispiel aus Deinem Code:</p>
<pre><code class="language-cpp">&lt;&lt; &quot;\Bool:  \n&quot;
&lt;&lt;setw(15)&lt;&lt;sizeof(bool)
&lt;&lt; &quot;\nChar: \n &quot;
&lt;&lt;setw(15)&lt;&lt;sizeof(char)
</code></pre>
<p>Hier wird nach 'Bool:' eine neue Zeile begonnen und 15 stellig sizeof(bool) ausgegeben, dann wird 'Char: ' ausgegeben, eine neue Zeile begonnen, als erstes ein Leerzeichen in die neue Zeile geschrieben, dann 15 stellig sizeof(char) ausgegeben, deshalb hat diese Zeile 16 Stellen und nicht 15, wie die erste, usw.</p>
</blockquote>
<p>Tur mir Leid hat recht, hab das verwechselt weil ich auch schonmal so ein ähnliches Problem hatte, allerdings ging es dort darum alles z.B. rechtsbündig zu haben.</p>
<p>Lg freeG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042295</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042295</guid><dc:creator><![CDATA[fr33g]]></dc:creator><pubDate>Wed, 30 Mar 2011 12:39:04 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 12:56:58 GMT]]></title><description><![CDATA[<p>fr33g schrieb:</p>
<blockquote>
<p>Tur mir Leid hat recht, hab das verwechselt weil ich auch schonmal so ein ähnliches Problem hatte, allerdings ging es dort darum alles z.B. rechtsbündig zu haben.</p>
</blockquote>
<p>Das geht aber auch mit zB<br />
cout &lt;&lt; setw(15) &lt;&lt; right &lt;&lt; &quot;Text&quot;;<br />
cout &lt;&lt; '\n';<br />
cout &lt;&lt; setw(15) &lt;&lt; right &lt;&lt; &quot;mehr Text&quot;;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042308</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042308</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 30 Mar 2011 12:56:58 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 13:18:35 GMT]]></title><description><![CDATA[<p>Gugelmoser schrieb:</p>
<blockquote>
<p>meinst du so?</p>
<pre><code class="language-cpp">void SizeOf()
{
    cout &lt;&lt; setw(10) &lt;&lt; &quot;Belegter Speicher in Byte:\n&quot;
         &lt;&lt; setw(10) &lt;&lt; &quot;bool = &quot;   &lt;&lt; sizeof(bool)     &lt;&lt; &quot;\n&quot;
         &lt;&lt; setw(10) &lt;&lt; &quot;char = &quot;   &lt;&lt; sizeof(char)     &lt;&lt; &quot;\n&quot;
         &lt;&lt; setw(10) &lt;&lt; &quot;int = &quot;    &lt;&lt; sizeof(int)      &lt;&lt; &quot;\n&quot;
         &lt;&lt; setw(10) &lt;&lt; &quot;float = &quot;  &lt;&lt; sizeof(float)    &lt;&lt; &quot;\n&quot;
         &lt;&lt; setw(10) &lt;&lt; &quot;double = &quot; &lt;&lt; sizeof(double)   &lt;&lt; &quot;\n&quot;;
}
</code></pre>
<p>lg</p>
</blockquote>
<p>Nein, ich meinte es so, das die Namen der Variabeln linksbündig am Rand und die Bitgrößen rechtsbündig weiter hinten stehen!</p>
<p>Aber danke schonmal für eure Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042334</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042334</guid><dc:creator><![CDATA[Hänselchen]]></dc:creator><pubDate>Wed, 30 Mar 2011 13:18:35 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Iomanip on Wed, 30 Mar 2011 13:45:47 GMT]]></title><description><![CDATA[<p>habs selber rausgefunden! :&gt;</p>
<pre><code class="language-cpp">cout &lt;&lt; setw(10) &lt;&lt; &quot;Belegter Speicher in Byte:\n&quot; 
         &lt;&lt;left &lt;&lt; setw(15) &lt;&lt; &quot;bool = &quot;  &lt;&lt; setw(15) &lt;&lt; sizeof(bool)     &lt;&lt; &quot;\n&quot; 
         &lt;&lt;left &lt;&lt; setw(15) &lt;&lt; &quot;char = &quot;  &lt;&lt; setw(15) &lt;&lt; sizeof(char)     &lt;&lt; &quot;\n&quot; 
         &lt;&lt;left &lt;&lt; setw(15) &lt;&lt; &quot;int = &quot;   &lt;&lt; setw(15) &lt;&lt; sizeof(int)      &lt;&lt; &quot;\n&quot; 
         &lt;&lt;left &lt;&lt; setw(15) &lt;&lt; &quot;float = &quot; &lt;&lt; setw(15) &lt;&lt; sizeof(float)    &lt;&lt; &quot;\n&quot; 
         &lt;&lt;left &lt;&lt; setw(15) &lt;&lt; &quot;double = &quot;&lt;&lt; setw(15) &lt;&lt; sizeof(double)   &lt;&lt; &quot;\n&quot;; 
	getch();
</code></pre>
<p>Abe rnur Dank euch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>DANKE!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2042352</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2042352</guid><dc:creator><![CDATA[Hänselchen]]></dc:creator><pubDate>Wed, 30 Mar 2011 13:45:47 GMT</pubDate></item></channel></rss>