<?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[klasse wird nicht als typ erkannt - warum?]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;cmath&gt;
#include &lt;fstream&gt;

using namespace std;

class pcoord
{
	public:
	double x;
	double y;
}

int pcoord flocke(pcoord, int, double)*;
</code></pre>
<blockquote>
<p>14 `pcoord' does not name a type</p>
</blockquote>
<p>ich verstehs nich... pls help danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/256657/klasse-wird-nicht-als-typ-erkannt-warum</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 23:37:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/256657.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 Dec 2009 03:52:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 03:52:00 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;cmath&gt;
#include &lt;fstream&gt;

using namespace std;

class pcoord
{
	public:
	double x;
	double y;
}

int pcoord flocke(pcoord, int, double)*;
</code></pre>
<blockquote>
<p>14 `pcoord' does not name a type</p>
</blockquote>
<p>ich verstehs nich... pls help danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823276</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823276</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 03:52:00 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 04:01:57 GMT]]></title><description><![CDATA[<p>Hinter die Klassendefinition gehört noch ein Semikolon.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823277</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823277</guid><dc:creator><![CDATA[Athar]]></dc:creator><pubDate>Wed, 16 Dec 2009 04:01:57 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 09:51:22 GMT]]></title><description><![CDATA[<blockquote>
<pre><code class="language-cpp">int pcoord flocke(pcoord, int, double)*;
</code></pre>
</blockquote>
<p>pcoord flocke**;(int double,,,()))((flocke???<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
HÄ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823347</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Wed, 16 Dec 2009 09:51:22 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 10:42:25 GMT]]></title><description><![CDATA[<p>sry falscher text das &quot;int&quot; hat da eig nichts zu suchen..<br />
hatte das irgendwann mal testweise davor geschrieben aber vergessen es wieder weg zu nehmen denk es dir einfach weg die fehlermeldung bleibt die gleiche <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823378</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823378</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 10:42:25 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 10:50:50 GMT]]></title><description><![CDATA[<p>Athar schrieb:</p>
<blockquote>
<p>Hinter die Klassendefinition gehört noch ein Semikolon.</p>
</blockquote>
<p>ohh man ja klar sicher! danke :)hab ich irgendwie total übersehen -.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823383</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 10:50:50 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 11:19:32 GMT]]></title><description><![CDATA[<p>so ich hab jetz eigentlich alle fehler eliminiert aber einen versteh ich immer noch nicht:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;cmath&gt;
#include &lt;fstream&gt;

using namespace std;

class pcoord
{
	public:
	double x;
	double y;
};

pcoord * flocke(pcoord, int, double);
int main()
{
	int rek;
	int anz;
	double p;
	double BetrS;
	double BetrH;
	pcoord * A = new pcoord[anz];
	cout&lt;&lt; &quot;Geben Sie eine Anzahl von Punkten ein:&quot; &lt;&lt;endl;
    while(1)
    {
              cout&lt;&lt; &quot;Sie müssen mindestens zwei Punkte angeben!&quot; &lt;&lt;endl;
   	          cout&lt;&lt; &quot;Geben Sie eine Anzahl von Punkten ein: &quot; &lt;&lt;endl;
   	          cin&gt;&gt;anz;
   	          if (anz&lt;2)
   	             ;
              else
                  break;
    }        
    for(int i=0; i=anz; i++)
    {
            cout&lt;&lt; &quot;Geben Sie die Koordinaten des &quot; &lt;&lt; i+1 &lt;&lt; &quot;. Punktes an:&quot; &lt;&lt;endl;
            cout&lt;&lt; &quot;X-Koordinate: &quot; &lt;&lt;endl;
            cin &gt;&gt; A[i].x;
            cout&lt;&lt; &quot;Y-Koordinate: &quot; &lt;&lt;endl;
            cin &gt;&gt; A[i].y;
    }
cout&lt;&lt; &quot;Geben Sie den Streckfaktor an: &quot; &lt;&lt;endl;
cin &gt;&gt; p;
cout&lt;&lt; &quot;Geben Sie die Rekursionstiefe an: &quot; &lt;&lt;endl;
cin &gt;&gt; rek;
pcoord * flocke(pcoord A, int rek, double p);
}
pcoord * flocke(pcoord A, int rek, double p)
{       
        double BetrS = sqrt(A[1].x*A[1].x - 2*A[0].x*A[1].x + A[0].x*A[0].x + A[1].y*A[1].y - 2*A[0].y*A[1].y + A[0].y*A[0].y);
        double BetrH = sqrt(A[1].y*A[1].y - 2*A[0].y*A[1].y + A[0].y*A[0].y + A[0].x*A[0].x - 2*A[0].x*A[1].x + A[1].x*A[1].x);
        pcoord * punkte = new pcoord[5];
        punkte[0].x = A[0].x;
        punkte[0].y = A[0].y;
        punkte[1].x = (A[1].x-A[0].x)/3+A[0].x;
        punkte[1].y = (A[1].y-A[0].y)/3+A[0].x;
        punkte[2].x = (A[1].x-A[0].x)/2+(A[1].y-A[0].y)*p*BetrS/BetrH*sqrt((p*p+1)/2)*sin(60)+A[0].x;
        punkte[2].y = (A[1].y-A[0].y)/2+(A[0].x-A[1].x)*p*BetrS/BetrH*sqrt((p*p+1)/2)*sin(60)+A[0].y;
        punkte[3].x = (A[1].x-A[0].x)*2/3+A[0].x;
        punkte[3].y = (A[1].y-A[0].y)*2/3+A[0].y;
        punkte[4].x = A[1].x;
        punkte[4].y = A[1].y;			

        for(int i=0; i&lt;4; i++)
        {
                A[0].x = punkte[i].x;
                A[0].y = punkte[i].y;
                A[1].x = punkte[i+1].x;
                A[1].y = punkte[i+1].y;
                flocke(A, rek-1, p);
                if(rek==0)
                          break;
        }
}
</code></pre>
<blockquote>
<p>54 no match for 'operator[]' in 'A[1]'<br />
54 no match for 'operator[]' in 'A[1]'<br />
54 no match for 'operator[]' in 'A[0]'<br />
54 no match for 'operator[]' in 'A[0]'<br />
...etc etc..</p>
</blockquote>
<p>woran liegt das?<br />
ich habe A doch definiert..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823396</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823396</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 11:19:32 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 11:47:55 GMT]]></title><description><![CDATA[<p>mapfoO schrieb:</p>
<blockquote>
<blockquote>
<p>54 no match for 'operator[]' in 'A[1]'<br />
54 no match for 'operator[]' in 'A[1]'<br />
54 no match for 'operator[]' in 'A[0]'<br />
54 no match for 'operator[]' in 'A[0]'<br />
...etc etc..</p>
</blockquote>
<p>woran liegt das?<br />
ich habe A doch definiert..</p>
</blockquote>
<p>Und A ist laut deiner Definition ein pcoord, welches keinen Operator [] kennt. Willst du vielleicht, dass A ein <em>Zeiger</em> auf pcoord sein soll?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823411</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823411</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 16 Dec 2009 11:47:55 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 11:54:34 GMT]]></title><description><![CDATA[<p>Du initialisierst A[i] nie, du erstellst nur ein Array. du musst jedem Feld im Array ein pcoord erstellen. also bevor A[i].x; musst du A[i] = new pcoord();</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823416</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823416</guid><dc:creator><![CDATA[spjoe]]></dc:creator><pubDate>Wed, 16 Dec 2009 11:54:34 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 12:26:45 GMT]]></title><description><![CDATA[<p>naja pcoord soll einfach nur ein punkt sein mit den argumenten der x und y koordinate.<br />
alles was in der main passieren soll is dass man punkte und deren koordinaten angeben kann worauf dann die funktion flocke zurückgreift.</p>
<p>flocke soll nebenbei gesagt eine art schneeflocke erstellen (wenn man die punkte dan plottet).die berechnungen der einzelnen punkte müsste soweit stimmen. n rechenfehler auszugleichen is ja auch erstmal nich so das ding es soll nur erstmal prinzipiell funktionieren. ich weiss sowieso noch nicht ob das mit rekursion so geht wie ich es aufgeschrieben habe nur bin ich leider nicht mal soweit das zu testen.</p>
<p>die x und y koordinaten der neuen punkte sollen dann auch in ein textdokument geschrieben werden damit man sie dann mit gnuplot plotten kann auch da hab ich keine idee wie das gehen soll.</p>
<p>und wenn das dann geschafft ist muss ich es noch hinbekommen dass flocke sich nicht nur auf eine sondern auf alle strecken zwischen den angegebenen punkten ausführt....ich brauche echt hilfe^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823436</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 12:26:45 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 12:33:51 GMT]]></title><description><![CDATA[<p>achja noch ne kleine frage^^</p>
<p>wie schreibe ich &quot;anz&lt;2 oder anz ist keine ganze positive zahl&quot; ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823441</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 12:33:51 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 13:10:28 GMT]]></title><description><![CDATA[<p>Für Arrays würd ich einen std::vector nehmen. Dafür musst du dann den vector-Header inkludieren. Du solltest das Array auch erst erstellen, nachdem eine größe eingegeben wurde. Ich hab den Code mal angepasst, so dass er kompiliert und ausführbar ist. An den Kommentaren siehst du was ich geändert habe:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;cmath&gt;
#include &lt;fstream&gt;
#include &lt;vector&gt; // Für std::vector

using namespace std;

class pcoord
{
    public:
    double x;
    double y;
};

pcoord * flocke(std::vector&lt;pcoord&gt;&amp;, int, double); // Array als Parameter.
int main()
{
    int rek;
    int anz;
    double p;
    double BetrS;
    double BetrH;
    // Erst die Zahl eingeben, dann arrray erstellen
    cout&lt;&lt; &quot;Geben Sie eine Anzahl von Punkten ein:&quot; &lt;&lt;endl;
    while(1)
    {
              cout&lt;&lt; &quot;Sie müssen mindestens zwei Punkte angeben!&quot; &lt;&lt;endl;
                 cout&lt;&lt; &quot;Geben Sie eine Anzahl von Punkten ein: &quot; &lt;&lt;endl;
                 cin&gt;&gt;anz;
                 if (anz&lt;2)
                    ;
              else
                  break;
    }
    std::vector&lt;pcoord&gt; A(anz); // vector statt new
    for(int i=0; i&lt;anz; i++) // hier war die bedingung falsch
    {
            cout&lt;&lt; &quot;Geben Sie die Koordinaten des &quot; &lt;&lt; i+1 &lt;&lt; &quot;. Punktes an:&quot; &lt;&lt;endl;
            cout&lt;&lt; &quot;X-Koordinate: &quot; &lt;&lt;endl;
            cin &gt;&gt; A[i].x;
            cout&lt;&lt; &quot;Y-Koordinate: &quot; &lt;&lt;endl;
            cin &gt;&gt; A[i].y;
    }
cout&lt;&lt; &quot;Geben Sie den Streckfaktor an: &quot; &lt;&lt;endl;
cin &gt;&gt; p;
cout&lt;&lt; &quot;Geben Sie die Rekursionstiefe an: &quot; &lt;&lt;endl;
cin &gt;&gt; rek;
pcoord * flocke(pcoord A, int rek, double p); // das ist kein funktionsaufruf!!
}
// warum hat die funktion als rückgabewert pcoord*?
pcoord * flocke(std::vector&lt;pcoord&gt;&amp; A, int rek, double p)
{
        double BetrS = sqrt(A[1].x*A[1].x - 2*A[0].x*A[1].x + A[0].x*A[0].x + A[1].y*A[1].y - 2*A[0].y*A[1].y + A[0].y*A[0].y);
        double BetrH = sqrt(A[1].y*A[1].y - 2*A[0].y*A[1].y + A[0].y*A[0].y + A[0].x*A[0].x - 2*A[0].x*A[1].x + A[1].x*A[1].x);
        std::vector&lt;pcoord&gt; punkte(5); // Hier auch vector benutzen
        punkte[0].x = A[0].x;
        punkte[0].y = A[0].y;
        punkte[1].x = (A[1].x-A[0].x)/3+A[0].x;
        punkte[1].y = (A[1].y-A[0].y)/3+A[0].x;
        punkte[2].x = (A[1].x-A[0].x)/2+(A[1].y-A[0].y)*p*BetrS/BetrH*sqrt((p*p+1)/2)*sin(60)+A[0].x;
        punkte[2].y = (A[1].y-A[0].y)/2+(A[0].x-A[1].x)*p*BetrS/BetrH*sqrt((p*p+1)/2)*sin(60)+A[0].y;
        punkte[3].x = (A[1].x-A[0].x)*2/3+A[0].x;
        punkte[3].y = (A[1].y-A[0].y)*2/3+A[0].y;
        punkte[4].x = A[1].x;
        punkte[4].y = A[1].y;

        for(int i=0; i&lt;4; i++)
        {
                A[0].x = punkte[i].x;
                A[0].y = punkte[i].y;
                A[1].x = punkte[i+1].x;
                A[1].y = punkte[i+1].y;
                flocke(A, rek-1, p);
                if(rek==0)
                          break;
        }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1823465</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823465</guid><dc:creator><![CDATA[joomoo]]></dc:creator><pubDate>Wed, 16 Dec 2009 13:10:28 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 13:17:24 GMT]]></title><description><![CDATA[<p>mapfoO schrieb:</p>
<blockquote>
<p>wie schreibe ich &quot;anz&lt;2 oder anz ist keine ganze positive zahl&quot; ?</p>
</blockquote>
<p>anz &lt;= 0</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823470</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823470</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 16 Dec 2009 13:17:24 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 13:18:48 GMT]]></title><description><![CDATA[<p>Wohl eher anz&lt;2. Wie kann eigentlich eine Ganzzahl (int) nicht ganzzahlig sein?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823473</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823473</guid><dc:creator><![CDATA[Athar]]></dc:creator><pubDate>Wed, 16 Dec 2009 13:18:48 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 13:39:35 GMT]]></title><description><![CDATA[<p>Athar schrieb:</p>
<blockquote>
<p>Wohl eher anz&lt;2.</p>
</blockquote>
<p>Ja, natürlich. Ich habe mit logischem UND statt ODER gedacht.</p>
<blockquote>
<p>Wie kann eigentlich eine Ganzzahl (int) nicht ganzzahlig sein?</p>
</blockquote>
<p>Vermutlich weil der Fragesteller nur wirres Zeug geschrieben hat, was er gar nicht so meinte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823493</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823493</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 16 Dec 2009 13:39:35 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 13:50:55 GMT]]></title><description><![CDATA[<p>joomoo schrieb:</p>
<blockquote>
<pre><code class="language-cpp">...

pcoord * flocke(pcoord A, int rek, double p); // das ist kein funktionsaufruf!!
}
// warum hat die funktion als rückgabewert pcoord*?

...
</code></pre>
</blockquote>
<p>ja das stand da auch eigentlich ganz anders nur hat er gemeckert beim kompilieren also habe ich es so weit verändert bis es ging :&gt;</p>
<p>aber danke auf jeden fall <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
ich habe mit vektoren allerdings noch nie gearbeitet..würde das so wie ich es gemacht habe gar nicht gehen? oder gibt es da auch eine möglichkeit es anders zu schreiben?</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/4826">@rest</a>: lol jo seppj hat wohl etwas recht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
also klar ist anz ein int. aber ich kann ja trotzdem 2.3 eingeben. und 2.3 punkte geht ja schlecht. oder rundet der automatisch auf?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823496</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823496</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 13:50:55 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 13:56:21 GMT]]></title><description><![CDATA[<p>mapfoO schrieb:</p>
<blockquote>
<p>ja das stand da auch eigentlich ganz anders nur hat er gemeckert beim kompilieren also habe ich es so weit verändert bis es ging :&gt;</p>
</blockquote>
<p>Gaaaanz schlechte Vorgehensweise. Gewöhn dir das unbedingt ab.</p>
<blockquote>
<p>aber danke auf jeden fall <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
ich habe mit vektoren allerdings noch nie gearbeitet..würde das so wie ich es gemacht habe gar nicht gehen? oder gibt es da auch eine möglichkeit es anders zu schreiben?</p>
</blockquote>
<p>Klar, mit dynamischen Arrays, so wie du das vorher versucht hast. Nur haatest du offensichtlich die nötige Syntax nicht drauf. Da ist der vector doch die bessere Wahl, da er eine sehr ähnliche Funktionalität bietet, dabei aber genauso zu benutzen ist, wie andere Objekte auch, während dynamische Arrays für Anfänger eher unintuitiv funktionieren.</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/4826">@rest</a>: lol jo seppj hat wohl etwas recht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
also klar ist anz ein int. aber ich kann ja trotzdem 2.3 eingeben. und 2.3 punkte geht ja schlecht. oder rundet der automatisch auf?</p>
</blockquote>
<p>Probiers doch mal aus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823501</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823501</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 16 Dec 2009 13:56:21 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 14:07:58 GMT]]></title><description><![CDATA[<p>wie hast du bloß gemerkt dass ich ein anfänger bin xD</p>
<p>jo nur wollte ich die aufgabe möglichst nur mit dingen lösen die ich auch kenne. aber so wie sich das anhört kenne ich dynamische arrays wohl weniger als vectoren was? :x</p>
<p>ok aber wie speichere ich jetzt die berechneten punkte in einem dokument ab?<br />
irgendwie ja wohl mit return ..aber wo und was?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823511</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 14:07:58 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 14:36:09 GMT]]></title><description><![CDATA[<p>mapfoO schrieb:</p>
<blockquote>
<p>ok aber wie speichere ich jetzt die berechneten punkte in einem dokument ab?<br />
irgendwie ja wohl mit return ..aber wo und was?</p>
</blockquote>
<p>Nein, mit std::ofstream. Gibt's viele tutorials zu, z.b. <a href="http://www.cpp-home.com/archives/67.htm" rel="nofollow">http://www.cpp-home.com/archives/67.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823529</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823529</guid><dc:creator><![CDATA[rofl]]></dc:creator><pubDate>Wed, 16 Dec 2009 14:36:09 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 14:45:03 GMT]]></title><description><![CDATA[<p>jo ok aber ich mein ich muss ja jetzt erstmal sagen was die funktion ausgeben soll oder nich?<br />
ich weiss ja nicht mal ob die rekursion so funktioniert wie sie da steht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823531</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823531</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 14:45:03 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 15:54:29 GMT]]></title><description><![CDATA[<p>kann mir das nich bitte mal jemand erklären?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823576</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823576</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 15:54:29 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 16:00:31 GMT]]></title><description><![CDATA[<p>Öhmm.. ich weiss nicht so recht, wo du jetzt noch Probleme hast..</p>
<p>Ich meine du stellst sehr viele Fragen. Wo genau hast du Probleme?</p>
<ul>
<li>Dein Code? Also was die Funktion macht und ob das korrekt ist?</li>
<li>Das bentzen von std::vector?</li>
<li>Das ausgeben von Daten in ein File?</li>
</ul>
<p>Das sind alles recht andere Probleme und wenn du dich ein wenig mit den hier genannten Links beschäftigst, dann kannst du zumindest die letzten 2 eigentlich selber herausfinden. Ausser du has dort noch speziell eine Frage..</p>
<p>Und was deinen Code angeht. Das ist schwer zu sagen, ob der korrekt funktioniert. Kommt halt drauf an, was er machen soll. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
Tut er denn nicht, was du willst?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823580</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823580</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Wed, 16 Dec 2009 16:00:31 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 16:19:10 GMT]]></title><description><![CDATA[<p>noch macht er ja gar nichts <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
von daher ja er macht nicht was ich will.</p>
<p>ich will die punkte plotten und das geht nicht wenn ich ihre koordinaten nicht irgendwie abspeichere. ich weiss aber nicht wie das geht.</p>
<p>ich mein klar:</p>
<p>ofstream ausgabe(&quot;..../daten.txt&quot;); zb oder so<br />
aber das reicht ja noch nicht es wird ja noch gar nicht gesagt WAS in die datei geschrieben werden soll. und das ist auch meine frage.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823590</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 16:19:10 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 16:22:40 GMT]]></title><description><![CDATA[<p>Och.. viel fehlt da nicht mehr. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<pre><code class="language-cpp">int number = 2;
std::string text = &quot;hmm&quot;;

std::ofstream out (&quot;file.txt&quot;);
out &lt;&lt; number &lt;&lt; &quot;\n&quot;;
out &lt;&lt; text;
</code></pre>
<p>Aber das steht auch in den genannten Links. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Das mit dem plotten verstehe ich nicht ganz. Du hast die Daten ja intern, dann kannst du das doch auch plotten. (oder machst du das mit einem anderen Programm?)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823592</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Wed, 16 Dec 2009 16:22:40 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 17:38:15 GMT]]></title><description><![CDATA[<p>aber was bedeutet das konkret für mein programm?<br />
wo muss ich das hinschreiben? in die funktion?<br />
in die rekursionsschleife?<br />
und was wäre &quot;number&quot; in meinem fall?</p>
<p>ich weiss es wirklich nicht^^</p>
<p>ja ich soll das als dokument ausgeben damit es mit gnuplot geplottet werden kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823626</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823626</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 17:38:15 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 17:48:38 GMT]]></title><description><![CDATA[<p>Das sollest doch du wissen?! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
<p>Was willst du in dem File haben? Und wo wird das in deinem Programm berechnet? Jetzt kannst du mal raten, wo du etwas ins File ausgeben kannst.. Frühestesn dort, wo dus berechnet hast.. Vielleicht aber erst später, wenn du z.B die Daten noch sortieren musst oder was auch immer.</p>
<p>Da solltest du einfach mal ein wenig drüber nachdenken..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823632</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823632</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Wed, 16 Dec 2009 17:48:38 GMT</pubDate></item><item><title><![CDATA[Reply to klasse wird nicht als typ erkannt - warum? on Wed, 16 Dec 2009 17:55:52 GMT]]></title><description><![CDATA[<p>ich denke schon die ganze verdammte woche..und freitag muss das fertig sein. viel zeit habe ich also nicht mehr. und wie du schon gemerkt hast bin ich totaler anfänger. ich habe noch NIE vorher programmiert das is mein erstes programm. woher soll ich das denn alles wissen wenn ich es nicht erfrage? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":/"
      alt="😕"
    /></p>
<p>es ist ja nicht so als ob ich nicht rumprobieren würde aber es klappt eben nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1823635</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1823635</guid><dc:creator><![CDATA[mapfoO]]></dc:creator><pubDate>Wed, 16 Dec 2009 17:55:52 GMT</pubDate></item></channel></rss>