<?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[String Länge]]></title><description><![CDATA[<p>Hallo erst mal<br />
Ein Anfänger braucht Hilfe in C/C++.<br />
Ich hoffe es kann mir jemand sagen wie ich in diesem Programm &quot;printf&quot; deklarieren muss. Ich erhalte immer die Fehlermeldung printf wäre nicht deklariert. Ich finde nicht heraus warum? Vielen Dank im voraus. hanna1<br />
Ich habe einen WATCOM Compiler 11.0</p>
<p>#include &lt;iostream.h&gt;<br />
#include &lt;conio.h&gt;<br />
//define BIL clrscr();<br />
class MyString<br />
{<br />
private:<br />
char* string;</p>
<p>public:<br />
int Len()</p>
<p>{<br />
int len=0;</p>
<p>while (string[len])<br />
{<br />
len++;<br />
}<br />
return len;<br />
}<br />
MyString operator = (char* text)<br />
{<br />
string = text;<br />
return *this;<br />
}<br />
};</p>
<p>int main()<br />
{</p>
<p>MyString string;<br />
string=&quot;Hallo Welt&quot;;<br />
printf(&quot;%s\n&quot;,string);<br />
printf(&quot;%d\n&quot;,string.Len());</p>
<p>return 0;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/66120/string-länge</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Jul 2026 07:11:17 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/66120.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Feb 2004 11:37:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to String Länge on Wed, 25 Feb 2004 11:37:05 GMT]]></title><description><![CDATA[<p>Hallo erst mal<br />
Ein Anfänger braucht Hilfe in C/C++.<br />
Ich hoffe es kann mir jemand sagen wie ich in diesem Programm &quot;printf&quot; deklarieren muss. Ich erhalte immer die Fehlermeldung printf wäre nicht deklariert. Ich finde nicht heraus warum? Vielen Dank im voraus. hanna1<br />
Ich habe einen WATCOM Compiler 11.0</p>
<p>#include &lt;iostream.h&gt;<br />
#include &lt;conio.h&gt;<br />
//define BIL clrscr();<br />
class MyString<br />
{<br />
private:<br />
char* string;</p>
<p>public:<br />
int Len()</p>
<p>{<br />
int len=0;</p>
<p>while (string[len])<br />
{<br />
len++;<br />
}<br />
return len;<br />
}<br />
MyString operator = (char* text)<br />
{<br />
string = text;<br />
return *this;<br />
}<br />
};</p>
<p>int main()<br />
{</p>
<p>MyString string;<br />
string=&quot;Hallo Welt&quot;;<br />
printf(&quot;%s\n&quot;,string);<br />
printf(&quot;%d\n&quot;,string.Len());</p>
<p>return 0;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/467434</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/467434</guid><dc:creator><![CDATA[hanna1]]></dc:creator><pubDate>Wed, 25 Feb 2004 11:37:05 GMT</pubDate></item><item><title><![CDATA[Reply to String Länge on Wed, 25 Feb 2004 11:41:36 GMT]]></title><description><![CDATA[<p>printf in stdio.h bzw. cstdio enthalten. include das mal, dann soll es klappen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/467435</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/467435</guid><dc:creator><![CDATA[CarstenJ]]></dc:creator><pubDate>Wed, 25 Feb 2004 11:41:36 GMT</pubDate></item><item><title><![CDATA[Reply to String Länge on Wed, 25 Feb 2004 12:32:23 GMT]]></title><description><![CDATA[<p>Das Topic passt nicht ganz zu deinem eigentlichen Problem...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/467464</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/467464</guid><dc:creator><![CDATA[ethereal]]></dc:creator><pubDate>Wed, 25 Feb 2004 12:32:23 GMT</pubDate></item><item><title><![CDATA[Reply to String Länge on Wed, 25 Feb 2004 13:53:43 GMT]]></title><description><![CDATA[<p>[quote=&quot;CarstenJ&quot;]printf in stdio.h bzw. cstdio enthalten. include das mal, dann soll es klappen.[/quote]</p>
<p>das war wirklich dämlich, denn das war der Fehler, ich glaube das passiert mir nicht noch mal. Jetzt klappt das Compilieren aber das Programm startet nicht es leuchtet nur kurz der schwarze Bildschirm auf und dann ist Schluss warum?</p>
<p>hanna1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/467545</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/467545</guid><dc:creator><![CDATA[hanna1]]></dc:creator><pubDate>Wed, 25 Feb 2004 13:53:43 GMT</pubDate></item><item><title><![CDATA[Reply to String Länge on Wed, 25 Feb 2004 13:55:18 GMT]]></title><description><![CDATA[<p>[quote=&quot;ethereal&quot;]Das Topic passt nicht ganz zu deinem eigentlichen Problem...[/quote] könntest du mir bitte erklären was du mit Topic meinst? Das verstehe ich nichtganz. hanna1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/467546</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/467546</guid><dc:creator><![CDATA[hanna1]]></dc:creator><pubDate>Wed, 25 Feb 2004 13:55:18 GMT</pubDate></item><item><title><![CDATA[Reply to String Länge on Wed, 25 Feb 2004 13:56:22 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/4091">@hanna</a></p>
<p>deine überschrift.. der titel deines aufgemachten threads passt nicht dazu, was du eigentlich für ein problem hattest.. nämlich, daß dir ein include fehlte:</p>
<p>cstdio</p>
]]></description><link>https://www.c-plusplus.net/forum/post/467548</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/467548</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Wed, 25 Feb 2004 13:56:22 GMT</pubDate></item><item><title><![CDATA[Reply to String Länge on Wed, 25 Feb 2004 14:25:53 GMT]]></title><description><![CDATA[<blockquote>
<p>Jetzt klappt das Compilieren aber das Programm startet nicht es leuchtet nur kurz der schwarze Bildschirm auf und dann ist Schluss warum?</p>
</blockquote>
<p>Das ist, weil das Programm nach ablauf der Mainfunktion gleich beendet wird.<br />
Wenn du die &quot;conio.h&quot; einbindest benutz einfach vor dem &quot;return 0;&quot; die Funktion &quot;getch();&quot;. Dann wartet er auf einen Tastendruck.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/467590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/467590</guid><dc:creator><![CDATA[matjes]]></dc:creator><pubDate>Wed, 25 Feb 2004 14:25:53 GMT</pubDate></item><item><title><![CDATA[Reply to String Länge on Wed, 25 Feb 2004 14:58:09 GMT]]></title><description><![CDATA[<p>[quote=&quot;matjes&quot;][quote]<br />
Jetzt klappt das Compilieren aber das Programm startet nicht es leuchtet nur kurz der schwarze Bildschirm auf und dann ist Schluss warum? [/quote]</p>
<p>Das ist, weil das Programm nach ablauf der Mainfunktion gleich beendet wird.<br />
Wenn du die &quot;conio.h&quot; einbindest benutz einfach vor dem &quot;return 0;&quot; die Funktion &quot;getch();&quot;. Dann wartet er auf einen Tastendruck.[/quote]</p>
<p>Vielen Dand für die Hilfe jetzt funktionierts wunderbar.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/467631</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/467631</guid><dc:creator><![CDATA[hanna1]]></dc:creator><pubDate>Wed, 25 Feb 2004 14:58:09 GMT</pubDate></item></channel></rss>