<?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[whitespace trotz skipws]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich moechte aus einem string und drei char's einen neuen string machen, in dem aber keine Whitespace mehr vorkommen. Ich habe das folgendermassen realisieren wollen:</p>
<pre><code>std::string chem_symb_;
char        remote_;
char        branch_;
char        alter_loc_;

std::ostringstream name_stream;
std::string name;

name_stream &lt;&lt; std::skipws &lt;&lt; chem_symb_ &lt;&lt; remote_ &lt;&lt; branch_ &lt;&lt; alter_loc_;
name = name_stream.str();

std::cout &lt;&lt; &quot;|&quot; &lt;&lt; name &lt;&lt; &quot;|\n&quot;;
</code></pre>
<p>Leider kommt bei der Ausgabe zum Beispiel | N1 | statt |N1| raus, also sind die whitespaces doch dringeblieben.</p>
<p>Kann mir jemand sagen, wo der Fehler liegt (ich hoffe, ich habe ausreichend code angegeben) und wie ich ihn korrigiere?</p>
<p>Vielen Dank,<br />
Tim</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/123126/whitespace-trotz-skipws</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 10:34:43 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/123126.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Oct 2005 09:59:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to whitespace trotz skipws on Thu, 13 Oct 2005 09:59:57 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich moechte aus einem string und drei char's einen neuen string machen, in dem aber keine Whitespace mehr vorkommen. Ich habe das folgendermassen realisieren wollen:</p>
<pre><code>std::string chem_symb_;
char        remote_;
char        branch_;
char        alter_loc_;

std::ostringstream name_stream;
std::string name;

name_stream &lt;&lt; std::skipws &lt;&lt; chem_symb_ &lt;&lt; remote_ &lt;&lt; branch_ &lt;&lt; alter_loc_;
name = name_stream.str();

std::cout &lt;&lt; &quot;|&quot; &lt;&lt; name &lt;&lt; &quot;|\n&quot;;
</code></pre>
<p>Leider kommt bei der Ausgabe zum Beispiel | N1 | statt |N1| raus, also sind die whitespaces doch dringeblieben.</p>
<p>Kann mir jemand sagen, wo der Fehler liegt (ich hoffe, ich habe ausreichend code angegeben) und wie ich ihn korrigiere?</p>
<p>Vielen Dank,<br />
Tim</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891194</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891194</guid><dc:creator><![CDATA[tim_g]]></dc:creator><pubDate>Thu, 13 Oct 2005 09:59:57 GMT</pubDate></item><item><title><![CDATA[Reply to whitespace trotz skipws on Thu, 13 Oct 2005 10:05:52 GMT]]></title><description><![CDATA[<p>skipws beeinflusst das Lesen aus einem Eingabestream. Du schreibst in einen Ausgabestream.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891203</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891203</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Thu, 13 Oct 2005 10:05:52 GMT</pubDate></item></channel></rss>