<?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::find verursacht]]></title><description><![CDATA[<p>Schönen Guten Abend</p>
<p>Ich habe ein kleines Problem.<br />
Erstmal den Code:</p>
<pre><code class="language-cpp">bool CheckMD5Good(string sMD5, vector&lt;string&gt;::pointer MD5Bad)
{
	if (find(MD5Bad-&gt;begin(), MD5Bad-&gt;end(), sMD5) != MD5Bad-&gt;end())
	{
		return true;
	}
	else
	{
		return false;
	}

}
</code></pre>
<p>Ich möchte eine MD5, welche in einem String gespeichert ist (sMD5) in einem Vector suchen, und da der sehr groß ist wollte ich dafür einen Zeiger nehmen. Aber ich bekomme immer die Fehlermeldung:</p>
<pre><code>1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\algorithm(41): error C2678: Binärer Operator '==': Es konnte kein Operator gefunden werden, der einen linksseitigen Operanden vom Typ 'char' akzeptiert (oder keine geeignete Konvertierung möglich)
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\exception(470): kann 'bool std::operator ==(const std::_Exception_ptr &amp;,const std::_Exception_ptr &amp;)' sein
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\exception(475): oder &quot;bool std::operator ==(std::_Null_type,const std::_Exception_ptr &amp;)&quot;
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\exception(481): oder &quot;bool std::operator ==(const std::_Exception_ptr &amp;,std::_Null_type)&quot;
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\system_error(408): oder &quot;bool std::operator ==(const std::error_code &amp;,const std::error_condition &amp;)&quot;
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\system_error(416): oder &quot;bool std::operator ==(const std::error_condition &amp;,const std::error_code &amp;)&quot;
1&gt;          bei Anpassung der Argumentliste '(char, const std::string)'
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\algorithm(74): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template &quot;_InIt std::_Find&lt;char*,_Ty&gt;(_InIt,_InIt,const _Ty &amp;)&quot;.
1&gt;          with
1&gt;          [
1&gt;              _InIt=char *,
1&gt;              _Ty=std::string
1&gt;          ]
1&gt;          c:\users\christian\documents\projects\pcfix\pcfix\src\checkfile.cpp(20): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template &quot;_InIt std::find&lt;std::_String_iterator&lt;_Elem,_Traits,_Alloc&gt;,std::string&gt;(_InIt,_InIt,const _Ty &amp;)&quot;.
1&gt;          with
1&gt;          [
1&gt;              _InIt=std::_String_iterator&lt;char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt;,
1&gt;              _Elem=char,
1&gt;              _Traits=std::char_traits&lt;char&gt;,
1&gt;              _Alloc=std::allocator&lt;char&gt;,
1&gt;              _Ty=std::string
1&gt;          ]
</code></pre>
<p>Ich hoffe ihr könnt mir helfen.</p>
<p>Mit freundlichen Grüßen<br />
pc-jedi</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/273290/std-find-verursacht</link><generator>RSS for Node</generator><lastBuildDate>Fri, 28 Aug 2026 07:46:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/273290.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Sep 2010 18:08:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::find verursacht on Fri, 03 Sep 2010 18:08:47 GMT]]></title><description><![CDATA[<p>Schönen Guten Abend</p>
<p>Ich habe ein kleines Problem.<br />
Erstmal den Code:</p>
<pre><code class="language-cpp">bool CheckMD5Good(string sMD5, vector&lt;string&gt;::pointer MD5Bad)
{
	if (find(MD5Bad-&gt;begin(), MD5Bad-&gt;end(), sMD5) != MD5Bad-&gt;end())
	{
		return true;
	}
	else
	{
		return false;
	}

}
</code></pre>
<p>Ich möchte eine MD5, welche in einem String gespeichert ist (sMD5) in einem Vector suchen, und da der sehr groß ist wollte ich dafür einen Zeiger nehmen. Aber ich bekomme immer die Fehlermeldung:</p>
<pre><code>1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\algorithm(41): error C2678: Binärer Operator '==': Es konnte kein Operator gefunden werden, der einen linksseitigen Operanden vom Typ 'char' akzeptiert (oder keine geeignete Konvertierung möglich)
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\exception(470): kann 'bool std::operator ==(const std::_Exception_ptr &amp;,const std::_Exception_ptr &amp;)' sein
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\exception(475): oder &quot;bool std::operator ==(std::_Null_type,const std::_Exception_ptr &amp;)&quot;
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\exception(481): oder &quot;bool std::operator ==(const std::_Exception_ptr &amp;,std::_Null_type)&quot;
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\system_error(408): oder &quot;bool std::operator ==(const std::error_code &amp;,const std::error_condition &amp;)&quot;
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\system_error(416): oder &quot;bool std::operator ==(const std::error_condition &amp;,const std::error_code &amp;)&quot;
1&gt;          bei Anpassung der Argumentliste '(char, const std::string)'
1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\algorithm(74): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template &quot;_InIt std::_Find&lt;char*,_Ty&gt;(_InIt,_InIt,const _Ty &amp;)&quot;.
1&gt;          with
1&gt;          [
1&gt;              _InIt=char *,
1&gt;              _Ty=std::string
1&gt;          ]
1&gt;          c:\users\christian\documents\projects\pcfix\pcfix\src\checkfile.cpp(20): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template &quot;_InIt std::find&lt;std::_String_iterator&lt;_Elem,_Traits,_Alloc&gt;,std::string&gt;(_InIt,_InIt,const _Ty &amp;)&quot;.
1&gt;          with
1&gt;          [
1&gt;              _InIt=std::_String_iterator&lt;char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt;,
1&gt;              _Elem=char,
1&gt;              _Traits=std::char_traits&lt;char&gt;,
1&gt;              _Alloc=std::allocator&lt;char&gt;,
1&gt;              _Ty=std::string
1&gt;          ]
</code></pre>
<p>Ich hoffe ihr könnt mir helfen.</p>
<p>Mit freundlichen Grüßen<br />
pc-jedi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1947937</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947937</guid><dc:creator><![CDATA[pc-jedi]]></dc:creator><pubDate>Fri, 03 Sep 2010 18:08:47 GMT</pubDate></item><item><title><![CDATA[Reply to std::find verursacht on Fri, 03 Sep 2010 18:17:32 GMT]]></title><description><![CDATA[<p>pc-jedi schrieb:</p>
<blockquote>
<p>Ich möchte eine MD5, welche in einem String gespeichert ist (sMD5) in einem Vector suchen, und da der sehr groß ist wollte ich dafür einen Zeiger nehmen. Aber ich bekomme immer die Fehlermeldung:</p>
</blockquote>
<p>Da hast du 2 Sachen völlig falsch verstanden:<br />
1. Was vector::pointer ist<br />
2. Wie man das eigentlich mit der Referenzübergabe macht</p>
<pre><code class="language-cpp">bool CheckMD5Good(string sMD5, vector&lt;string&gt; const &amp;MD5Bad)
{
    if (find(MD5Bad-&gt;begin(), MD5Bad-&gt;end(), sMD5) != MD5Bad-&gt;end())
    {
        return true;
    }
    else
    {
        return false;
    }

}
</code></pre>
<p>Ungetestet, sollte aber funktionieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1947938</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947938</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Fri, 03 Sep 2010 18:17:32 GMT</pubDate></item><item><title><![CDATA[Reply to std::find verursacht on Fri, 03 Sep 2010 19:08:42 GMT]]></title><description><![CDATA[<p>Ah vielen danke muss dann aber so aussehen:</p>
<pre><code class="language-cpp">bool CheckMD5Good(string sMD5, vector&lt;string&gt; const &amp;MD5Bad)
{
	if (find(MD5Bad.begin() , MD5Bad.end(), sMD5) != MD5Bad.end())
	{
		return true;
	}
	else
	{
		return false;
	}

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1947960</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947960</guid><dc:creator><![CDATA[pc-jedi]]></dc:creator><pubDate>Fri, 03 Sep 2010 19:08:42 GMT</pubDate></item><item><title><![CDATA[Reply to std::find verursacht on Fri, 03 Sep 2010 19:19:24 GMT]]></title><description><![CDATA[<p>oder so:</p>
<pre><code class="language-cpp">bool CheckMD5Good(string const &amp;sMD5, vector&lt;string&gt; const &amp;MD5Bad)
{
  return find(MD5Bad.begin() , MD5Bad.end(), sMD5) != MD5Bad.end();
}
</code></pre>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1947965</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947965</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Fri, 03 Sep 2010 19:19:24 GMT</pubDate></item></channel></rss>