<?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[daten umwandeln und dann in listctrl]]></title><description><![CDATA[<p>moin<br />
ich hab folgenes Problem und zwar kriege ich ein floatarray zurück, welches 8 Werte enthält, die in ein Listencontrol geschrieben werden sollen. wie kriege ich die werte umgewandelt. bin c++ anfänger, und hab gehört das man &quot;alloc&quot; und nen &quot;reinterpret_cast&quot; dafür verwenden kann, nur hab ich bisher damit noch nichts gemacht. Vielleicht kann mir ja jemand weiterhelfen, ein entsprechender quellcode wäre ideal, damit ich endlich weiterkomme.</p>
<p>Besten dank für eure Hilfe<br />
Hier dann mal mein quellcode:</p>
<p>float* GetData(const char *format, bool newdata) // holt sich die Daten vom messgerät und gib sie zurück<br />
{<br />
inFloat = true;<br />
if(format == NULL) return NULL;<br />
if(newdata) sendText(format);<br />
waiting_for_data = true;<br />
while(waiting_for_data) Sleep(1);<br />
return fData; // float fData[8]; &lt;-- in hearder datei<br />
}</p>
<p>void setTable()<br />
{<br />
int i;<br />
CString t1,t2;<br />
float *a = GetData(m_abfWerte, true);</p>
<p>LV_ITEM item;<br />
item.mask=LVIF_TEXT;<br />
int itemNr =0;</p>
<p>for(i=0; i&lt;NN; i++)<br />
{<br />
item.iItem=itemNr;<br />
item.pszText = wert[i] &lt;-- wert muss vom typ char* wert[] ={&quot;12541&quot;,&quot;4587&quot;,...};<br />
item.iSubItem=nr;<br />
itemNr=m_werteliste.InsertItem(&amp;item);<br />
m_werteliste.SetItem(&amp;item);<br />
}<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/70704/daten-umwandeln-und-dann-in-listctrl</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 02:52:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/70704.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Apr 2004 15:02:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to daten umwandeln und dann in listctrl on Sat, 10 Apr 2004 15:02:00 GMT]]></title><description><![CDATA[<p>moin<br />
ich hab folgenes Problem und zwar kriege ich ein floatarray zurück, welches 8 Werte enthält, die in ein Listencontrol geschrieben werden sollen. wie kriege ich die werte umgewandelt. bin c++ anfänger, und hab gehört das man &quot;alloc&quot; und nen &quot;reinterpret_cast&quot; dafür verwenden kann, nur hab ich bisher damit noch nichts gemacht. Vielleicht kann mir ja jemand weiterhelfen, ein entsprechender quellcode wäre ideal, damit ich endlich weiterkomme.</p>
<p>Besten dank für eure Hilfe<br />
Hier dann mal mein quellcode:</p>
<p>float* GetData(const char *format, bool newdata) // holt sich die Daten vom messgerät und gib sie zurück<br />
{<br />
inFloat = true;<br />
if(format == NULL) return NULL;<br />
if(newdata) sendText(format);<br />
waiting_for_data = true;<br />
while(waiting_for_data) Sleep(1);<br />
return fData; // float fData[8]; &lt;-- in hearder datei<br />
}</p>
<p>void setTable()<br />
{<br />
int i;<br />
CString t1,t2;<br />
float *a = GetData(m_abfWerte, true);</p>
<p>LV_ITEM item;<br />
item.mask=LVIF_TEXT;<br />
int itemNr =0;</p>
<p>for(i=0; i&lt;NN; i++)<br />
{<br />
item.iItem=itemNr;<br />
item.pszText = wert[i] &lt;-- wert muss vom typ char* wert[] ={&quot;12541&quot;,&quot;4587&quot;,...};<br />
item.iSubItem=nr;<br />
itemNr=m_werteliste.InsertItem(&amp;item);<br />
m_werteliste.SetItem(&amp;item);<br />
}<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/498838</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/498838</guid><dc:creator><![CDATA[jma]]></dc:creator><pubDate>Sat, 10 Apr 2004 15:02:00 GMT</pubDate></item><item><title><![CDATA[Reply to daten umwandeln und dann in listctrl on Sat, 10 Apr 2004 20:54:52 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>float in char-Arrays umwandeln kann man z.B. mit sprintf:</p>
<p><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_sprintf.2c_.swprintf.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_sprintf.2c_.swprintf.asp</a></p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/499044</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/499044</guid><dc:creator><![CDATA[Probe-Nutzer]]></dc:creator><pubDate>Sat, 10 Apr 2004 20:54:52 GMT</pubDate></item><item><title><![CDATA[Reply to daten umwandeln und dann in listctrl on Sun, 11 Apr 2004 02:22:52 GMT]]></title><description><![CDATA[<p>CString::Format() wäre auch eine Möglichkeit</p>
]]></description><link>https://www.c-plusplus.net/forum/post/499138</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/499138</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Sun, 11 Apr 2004 02:22:52 GMT</pubDate></item><item><title><![CDATA[Reply to daten umwandeln und dann in listctrl on Mon, 12 Apr 2004 09:03:54 GMT]]></title><description><![CDATA[<p>besten dank das wars ich ich gesucht habe<br />
jma</p>
]]></description><link>https://www.c-plusplus.net/forum/post/499655</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/499655</guid><dc:creator><![CDATA[jma]]></dc:creator><pubDate>Mon, 12 Apr 2004 09:03:54 GMT</pubDate></item></channel></rss>