<?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[Runtime error]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich bräuchte eure Hilfe bei folgendem Code. Ich sehe einfach den Fehler nicht. Wahrscheinlich ist es einfach nur zu spät.</p>
<pre><code>class A
{
    int _m;
    bool _b;
public:
    A (int m, bool b): _m(m), _b(b){}
};

bool foo (A* ok)
{
    //A* temp = ok;
    return true;
}

int main()
{
    return foo(&amp;A(4, true));
}
</code></pre>
<p>Danke für eure Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/313020/runtime-error</link><generator>RSS for Node</generator><lastBuildDate>Sun, 02 Aug 2026 09:25:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/313020.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 19 Jan 2013 20:56:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Runtime error on Sat, 19 Jan 2013 20:59:13 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich bräuchte eure Hilfe bei folgendem Code. Ich sehe einfach den Fehler nicht. Wahrscheinlich ist es einfach nur zu spät.</p>
<pre><code>class A
{
    int _m;
    bool _b;
public:
    A (int m, bool b): _m(m), _b(b){}
};

bool foo (A* ok)
{
    //A* temp = ok;
    return true;
}

int main()
{
    return foo(&amp;A(4, true));
}
</code></pre>
<p>Danke für eure Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2291442</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2291442</guid><dc:creator><![CDATA[*Rewind*]]></dc:creator><pubDate>Sat, 19 Jan 2013 20:59:13 GMT</pubDate></item><item><title><![CDATA[Reply to Runtime error on Sat, 19 Jan 2013 21:01:11 GMT]]></title><description><![CDATA[<pre><code>14:6: warning: unused parameter ‘ok’ [-Wunused-parameter]
: In function ‘int main()’:
:22:24: error: taking address of temporary [-fpermissive]
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2291443</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2291443</guid><dc:creator><![CDATA[g++bot]]></dc:creator><pubDate>Sat, 19 Jan 2013 21:01:11 GMT</pubDate></item><item><title><![CDATA[Reply to Runtime error on Sat, 19 Jan 2013 21:11:44 GMT]]></title><description><![CDATA[<p>Danke für den Hinweis. Der Runtime-Fehler hat mich anscheinend verwirrt. Ich habe erst nach dem Posten gesehen, dass es am return-Wert liegt (da ist der gcc von ideone nicht so informativ). Das mit dem temp. Objekt ist eigentlich kein Problem, weil ich sowieso</p>
<pre><code>return foo (new A(4, true));
</code></pre>
<p>genommen hätte und dann müsste es auch passen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2291445</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2291445</guid><dc:creator><![CDATA[*Rewind*]]></dc:creator><pubDate>Sat, 19 Jan 2013 21:11:44 GMT</pubDate></item></channel></rss>