<?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[fehler beim auslesen einer xml datei]]></title><description><![CDATA[<p>[code]#include &lt;irrXML.h&gt;<br />
#include &lt;stdio.h&gt;<br />
using namespace irr;<br />
using namespace io;</p>
<p>#include &lt;string&gt; // we use STL strings to store data in this example<br />
int x=3;<br />
int main()<br />
{<br />
IrrXMLReader* xml = createIrrXMLReader(&quot;config.xml&quot;);</p>
<p>// strings for storing the data we want to get out of the file<br />
std::string modelFile;<br />
std::string messageText;<br />
std::string caption;</p>
<p>// parse the file until end reached<br />
while(xml &amp;&amp; xml-&gt;read())<br />
{<br />
switch(xml-&gt;getNodeType())<br />
{<br />
case EXN_TEXT:<br />
// in this xml file, the only text which occurs is the messageText<br />
messageText = xml-&gt;getNodeData();<br />
break;<br />
case EXN_ELEMENT:<br />
{<br />
if (!strcmp(&quot;startUpModel&quot;, xml-&gt;getNodeName()))<br />
modelFile = xml-&gt;getAttributeValue(&quot;file&quot;);<br />
else<br />
if (!strcmp(&quot;messageText&quot;, xml-&gt;getNodeName()))<br />
caption = xml-&gt;getAttributeValue(&quot;caption&quot;);<br />
}<br />
break;<br />
}<br />
}<br />
printf(&quot;%s&quot;,messageText);<br />
printf(&quot;%i&quot;,modelFile);<br />
printf(&quot;%c&quot;,caption);</p>
<p>printf(&quot;%i&quot;,x);<br />
scanf(&quot;%i&quot;,x);<br />
// delete the xml parser after usage<br />
delete xml;<br />
return 0;<br />
}</p>
<p>ich bekomme aber fehler in form von:<br />
39 C:\Users\dixx\Desktop\irrxml-1.2\example\test.cpp [Warning] cannot pass objects of non-POD type `struct std::string' through `...'; call will abort at runtime</p>
<p>Wieso? Wie muss ich das machen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/198579/fehler-beim-auslesen-einer-xml-datei</link><generator>RSS for Node</generator><lastBuildDate>Fri, 02 Oct 2026 08:47:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/198579.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Nov 2007 22:15:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to fehler beim auslesen einer xml datei on Thu, 22 Nov 2007 22:15:36 GMT]]></title><description><![CDATA[<p>[code]#include &lt;irrXML.h&gt;<br />
#include &lt;stdio.h&gt;<br />
using namespace irr;<br />
using namespace io;</p>
<p>#include &lt;string&gt; // we use STL strings to store data in this example<br />
int x=3;<br />
int main()<br />
{<br />
IrrXMLReader* xml = createIrrXMLReader(&quot;config.xml&quot;);</p>
<p>// strings for storing the data we want to get out of the file<br />
std::string modelFile;<br />
std::string messageText;<br />
std::string caption;</p>
<p>// parse the file until end reached<br />
while(xml &amp;&amp; xml-&gt;read())<br />
{<br />
switch(xml-&gt;getNodeType())<br />
{<br />
case EXN_TEXT:<br />
// in this xml file, the only text which occurs is the messageText<br />
messageText = xml-&gt;getNodeData();<br />
break;<br />
case EXN_ELEMENT:<br />
{<br />
if (!strcmp(&quot;startUpModel&quot;, xml-&gt;getNodeName()))<br />
modelFile = xml-&gt;getAttributeValue(&quot;file&quot;);<br />
else<br />
if (!strcmp(&quot;messageText&quot;, xml-&gt;getNodeName()))<br />
caption = xml-&gt;getAttributeValue(&quot;caption&quot;);<br />
}<br />
break;<br />
}<br />
}<br />
printf(&quot;%s&quot;,messageText);<br />
printf(&quot;%i&quot;,modelFile);<br />
printf(&quot;%c&quot;,caption);</p>
<p>printf(&quot;%i&quot;,x);<br />
scanf(&quot;%i&quot;,x);<br />
// delete the xml parser after usage<br />
delete xml;<br />
return 0;<br />
}</p>
<p>ich bekomme aber fehler in form von:<br />
39 C:\Users\dixx\Desktop\irrxml-1.2\example\test.cpp [Warning] cannot pass objects of non-POD type `struct std::string' through `...'; call will abort at runtime</p>
<p>Wieso? Wie muss ich das machen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1408519</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1408519</guid><dc:creator><![CDATA[xmler]]></dc:creator><pubDate>Thu, 22 Nov 2007 22:15:36 GMT</pubDate></item><item><title><![CDATA[Reply to fehler beim auslesen einer xml datei on Thu, 22 Nov 2007 22:34:17 GMT]]></title><description><![CDATA[<p>cout statt printf verwenden. oder messageText.c_str() etc., wenns denn die olle c-funktion sein soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1408524</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1408524</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Thu, 22 Nov 2007 22:34:17 GMT</pubDate></item><item><title><![CDATA[Reply to fehler beim auslesen einer xml datei on Fri, 23 Nov 2007 14:22:58 GMT]]></title><description><![CDATA[<p>ekelhafter Mischmasch von C++, C und unformatiertem Code ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1408882</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1408882</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Fri, 23 Nov 2007 14:22:58 GMT</pubDate></item></channel></rss>