<?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[Frage zu Exception]]></title><description><![CDATA[<p>Hi, kann mir mal einer sagen wie ich mehrere Exceptions einbauen kann... ???</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main()
{
	int zahl;

	try{
		cout &lt;&lt; &quot;Ist die eingegebene Zahl eine 1?&quot;;
		cin &gt;&gt; zahl;
		if (zahl != 1)
			throw &quot;Zahl ist keine 1!!!&quot;;
	}

	catch (char * zeiger)
	{
		cout &lt;&lt; &quot;Fehler: &quot; &lt;&lt; zeiger &lt;&lt; endl;
		return 1;
	}

	cout &lt;&lt; &quot;Zahl war eine 1&quot;;
	return 0;

	fflush(stdin); cin.peek();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/140572/frage-zu-exception</link><generator>RSS for Node</generator><lastBuildDate>Mon, 31 Aug 2026 06:53:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/140572.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Mar 2006 18:49:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Frage zu Exception on Wed, 15 Mar 2006 18:49:44 GMT]]></title><description><![CDATA[<p>Hi, kann mir mal einer sagen wie ich mehrere Exceptions einbauen kann... ???</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main()
{
	int zahl;

	try{
		cout &lt;&lt; &quot;Ist die eingegebene Zahl eine 1?&quot;;
		cin &gt;&gt; zahl;
		if (zahl != 1)
			throw &quot;Zahl ist keine 1!!!&quot;;
	}

	catch (char * zeiger)
	{
		cout &lt;&lt; &quot;Fehler: &quot; &lt;&lt; zeiger &lt;&lt; endl;
		return 1;
	}

	cout &lt;&lt; &quot;Zahl war eine 1&quot;;
	return 0;

	fflush(stdin); cin.peek();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1017033</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1017033</guid><dc:creator><![CDATA[Honigtraube]]></dc:creator><pubDate>Wed, 15 Mar 2006 18:49:44 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Exception on Wed, 15 Mar 2006 18:55:02 GMT]]></title><description><![CDATA[<p>einfach mehere catch( mit verscvhieden parmetern)</p>
<p>MFG Shade37337</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1017037</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1017037</guid><dc:creator><![CDATA[branleb]]></dc:creator><pubDate>Wed, 15 Mar 2006 18:55:02 GMT</pubDate></item></channel></rss>