<?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[Undefined Reference Problem]]></title><description><![CDATA[<p>Guten Tag,<br />
ich bin grad an nem kleinen Programm dran, was eig. kein Problem sein sollte, aber ich hab ein &quot;undefined reference&quot; Problem. Ich poste mal den Code</p>
<p>main.cpp</p>
<pre><code class="language-cpp">#include &quot;Caesar.h&quot;

int main()
{
    Caesar c;
    c.cryption(&quot;abc&quot;, 2);
}
</code></pre>
<p>Caesar.h</p>
<pre><code class="language-cpp">#ifndef CAESAR_H_INCLUDED
#define CAESAR_H_INCLUDED

#include &lt;iostream&gt;
#include &lt;string&gt;

class Caesar
{
    private:
        int rot;
    public:
        std::string cryption(const std::string, int);
};

#endif // CAESAR_H_INCLUDED
</code></pre>
<p>Caesar.cpp</p>
<pre><code class="language-cpp">#include &quot;Caesar.h&quot;

std::string cryption(const std::string cleartext, int rotation)
{
    ....
}
</code></pre>
<p>Der Fehler wird mir in der main gegeben in der Zeile</p>
<pre><code class="language-cpp">c.cryption(&quot;abc&quot;, 2);
</code></pre>
<blockquote>
<p>undefined reference to `Caesar::cryption(std::string, int)'</p>
</blockquote>
<p>Ich denke das langt als Erklärung, ich hoffe ihr helft mir.</p>
<p>fy</p>
<p>EDIT:<br />
Hat sich gelöst, hab bei der Deklaration &quot;Caesar::&quot; vergessen zu schreiben :</p>
<blockquote>
<p>std::string **Caesar::**cryption(const std::string cleartext, int rotation)</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/topic/236524/undefined-reference-problem</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 20:53:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/236524.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Mar 2009 15:39:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Undefined Reference Problem on Mon, 16 Mar 2009 15:45:13 GMT]]></title><description><![CDATA[<p>Guten Tag,<br />
ich bin grad an nem kleinen Programm dran, was eig. kein Problem sein sollte, aber ich hab ein &quot;undefined reference&quot; Problem. Ich poste mal den Code</p>
<p>main.cpp</p>
<pre><code class="language-cpp">#include &quot;Caesar.h&quot;

int main()
{
    Caesar c;
    c.cryption(&quot;abc&quot;, 2);
}
</code></pre>
<p>Caesar.h</p>
<pre><code class="language-cpp">#ifndef CAESAR_H_INCLUDED
#define CAESAR_H_INCLUDED

#include &lt;iostream&gt;
#include &lt;string&gt;

class Caesar
{
    private:
        int rot;
    public:
        std::string cryption(const std::string, int);
};

#endif // CAESAR_H_INCLUDED
</code></pre>
<p>Caesar.cpp</p>
<pre><code class="language-cpp">#include &quot;Caesar.h&quot;

std::string cryption(const std::string cleartext, int rotation)
{
    ....
}
</code></pre>
<p>Der Fehler wird mir in der main gegeben in der Zeile</p>
<pre><code class="language-cpp">c.cryption(&quot;abc&quot;, 2);
</code></pre>
<blockquote>
<p>undefined reference to `Caesar::cryption(std::string, int)'</p>
</blockquote>
<p>Ich denke das langt als Erklärung, ich hoffe ihr helft mir.</p>
<p>fy</p>
<p>EDIT:<br />
Hat sich gelöst, hab bei der Deklaration &quot;Caesar::&quot; vergessen zu schreiben :</p>
<blockquote>
<p>std::string **Caesar::**cryption(const std::string cleartext, int rotation)</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1680942</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1680942</guid><dc:creator><![CDATA[freaky]]></dc:creator><pubDate>Mon, 16 Mar 2009 15:45:13 GMT</pubDate></item><item><title><![CDATA[Reply to Undefined Reference Problem on Mon, 16 Mar 2009 15:43:32 GMT]]></title><description><![CDATA[<p>In <code>std::string cryption(const std::string, int);</code> fehlt noch das rotation. Darf man nur weglassen, wenn von cryption keine Implementierung vorhanden ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1680944</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1680944</guid><dc:creator><![CDATA[Bulli]]></dc:creator><pubDate>Mon, 16 Mar 2009 15:43:32 GMT</pubDate></item><item><title><![CDATA[Reply to Undefined Reference Problem on Mon, 16 Mar 2009 15:45:08 GMT]]></title><description><![CDATA[<p><code>std::string Caesar::cryption(const std::string test,int rotation);</code></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1680946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1680946</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Mon, 16 Mar 2009 15:45:08 GMT</pubDate></item></channel></rss>