<?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[String nach einem &#x27; kontrollieren.]]></title><description><![CDATA[<p>Guten Nachmittag,</p>
<p>Ich bekomme es nicht hin meinen String nach einem ' zu kontrollieren.<br />
Was schlagt ihr vor.</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

int main()
{
    string a = &quot;aokok' d&quot;;
    for(int i=0; i&lt;a.size(); i++){
        if(a[i] == 'a'){ // mit a klappt es 
            cout &lt;&lt; &quot;Hat angeschlagen.\n&quot;;
        }else{
            cout &lt;&lt; &quot;V&quot;;
        }
    }

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/323911/string-nach-einem-kontrollieren</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 10:51:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/323911.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 22 Feb 2014 16:22:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to String nach einem &#x27; kontrollieren. on Sat, 22 Feb 2014 16:22:47 GMT]]></title><description><![CDATA[<p>Guten Nachmittag,</p>
<p>Ich bekomme es nicht hin meinen String nach einem ' zu kontrollieren.<br />
Was schlagt ihr vor.</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

int main()
{
    string a = &quot;aokok' d&quot;;
    for(int i=0; i&lt;a.size(); i++){
        if(a[i] == 'a'){ // mit a klappt es 
            cout &lt;&lt; &quot;Hat angeschlagen.\n&quot;;
        }else{
            cout &lt;&lt; &quot;V&quot;;
        }
    }

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2384615</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2384615</guid><dc:creator><![CDATA[Peter22]]></dc:creator><pubDate>Sat, 22 Feb 2014 16:22:47 GMT</pubDate></item><item><title><![CDATA[Reply to String nach einem &#x27; kontrollieren. on Sat, 22 Feb 2014 16:24:16 GMT]]></title><description><![CDATA[<pre><code>'\''
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2384616</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2384616</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sat, 22 Feb 2014 16:24:16 GMT</pubDate></item><item><title><![CDATA[Reply to String nach einem &#x27; kontrollieren. on Sat, 22 Feb 2014 16:43:59 GMT]]></title><description><![CDATA[<p>Ich hab mich schon etwas schlauer gemacht und brauche scheinbar eine Lösung die zu meinem Linux Zeichensatz passt. Das ich also<br />
a[i] = '33' z.B eingeben kann. Wofür 33 auch immer steht^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2384619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2384619</guid><dc:creator><![CDATA[Peter22]]></dc:creator><pubDate>Sat, 22 Feb 2014 16:43:59 GMT</pubDate></item><item><title><![CDATA[Reply to String nach einem &#x27; kontrollieren. on Sat, 22 Feb 2014 16:45:10 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<pre><code>'\''
</code></pre>
</blockquote>
<p>Funktioniert danke:)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2384620</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2384620</guid><dc:creator><![CDATA[Peter22]]></dc:creator><pubDate>Sat, 22 Feb 2014 16:45:10 GMT</pubDate></item><item><title><![CDATA[Reply to String nach einem &#x27; kontrollieren. on Sat, 22 Feb 2014 18:52:13 GMT]]></title><description><![CDATA[<p>Peter22 schrieb:</p>
<blockquote>
<p>Ich hab mich schon etwas schlauer gemacht und brauche scheinbar eine Lösung die zu meinem Linux Zeichensatz passt. Das ich also<br />
a[i] = '33' z.B eingeben kann. Wofür 33 auch immer steht^^</p>
</blockquote>
<p>'33' als Zeichenliteral ist sicher falsch. Vielleicht meinst du ja direkt 33.</p>
<p>Aber probier es doch selber aus, dann weißt du es:</p>
<pre><code>printf(&quot; ' ist %d \n&quot;, '\'');
printf(&quot; %c ist 33 \n&quot;, 33);
</code></pre>
<p>^(Sorry für den C-Code)^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2384632</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2384632</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Sat, 22 Feb 2014 18:52:13 GMT</pubDate></item><item><title><![CDATA[Reply to String nach einem &#x27; kontrollieren. on Sat, 22 Feb 2014 20:29:50 GMT]]></title><description><![CDATA[<p>Peter22 schrieb:</p>
<blockquote>
<p>Ich bekomme es nicht hin meinen String nach einem ' zu kontrollieren.<br />
Was schlagt ihr vor.</p>
</blockquote>
<pre><code>string a = &quot;aokok' d&quot;;
    cout &lt;&lt; (a.find('\'') != string::npos ? &quot;ja&quot; : &quot;nein&quot;) &lt;&lt; endl;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2384649</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2384649</guid><dc:creator><![CDATA[großbuchstaben]]></dc:creator><pubDate>Sat, 22 Feb 2014 20:29:50 GMT</pubDate></item></channel></rss>