<?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[Anfänger Frage]]></title><description><![CDATA[<p>Hallo ich habe ein Problem, weiss nicht genau wonach ich da suchen soll und was ich falsch mache, was ich so finde bei google und so, sagt ich mach es richtig...</p>
<pre><code>public: static_objekt(float radius, float eigenrotation, float x, float y)
{
    this-&gt;radius = radius;
    this-&gt;eigenrotation = eigenrotation;
    this-&gt;x = x;
    this-&gt;y = y;

}
public: static_objekt(){};
public:
void position()
{
    glTranslatef(x,y,0);

}

void rotation()
{
    glRotatef(this-&gt;zeit,0,0,1);
}
void transform()
{
    this-&gt;position();
    this-&gt;rotation();

}
void zeichnen()
{
    this-&gt;transform();
    glutWireSphere(this-&gt;radius, 30, 30);

}

public: void next(long zeit)
{

    this-&gt;zeit = zeit;
    this-&gt;zeichnen();

}
</code></pre>
<pre><code>class rotate_objekt :public static_objekt
{
float radius;
float eigenrotation;
float umlauf;
float abstand;
float ellipse;
static_objekt* travon;
public: rotate_objekt(float radius, float eigenrotation, float umlauf, float abstand, float ellipse, static_objekt* travon):static_objekt()
{
    this-&gt;radius = radius;
    this-&gt;eigenrotation = eigenrotation;
    this-&gt;umlauf = umlauf;
    this-&gt;abstand = abstand;
    this-&gt;ellipse = ellipse;
    this-&gt;travon = travon;

}

void position()
{
        glTranslatef(-3,-4,0);
}

};
</code></pre>
<p>ich will, dass rotate objekt von static objekt erbt, und die funktionen nutzen kann. aber void position() soll er neu definieren....<br />
hoffe ich drücke mich verständlich aus.</p>
<p>kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/252390/anfänger-frage</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 12:33:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/252390.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Oct 2009 07:49:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Anfänger Frage on Mon, 19 Oct 2009 07:49:57 GMT]]></title><description><![CDATA[<p>Hallo ich habe ein Problem, weiss nicht genau wonach ich da suchen soll und was ich falsch mache, was ich so finde bei google und so, sagt ich mach es richtig...</p>
<pre><code>public: static_objekt(float radius, float eigenrotation, float x, float y)
{
    this-&gt;radius = radius;
    this-&gt;eigenrotation = eigenrotation;
    this-&gt;x = x;
    this-&gt;y = y;

}
public: static_objekt(){};
public:
void position()
{
    glTranslatef(x,y,0);

}

void rotation()
{
    glRotatef(this-&gt;zeit,0,0,1);
}
void transform()
{
    this-&gt;position();
    this-&gt;rotation();

}
void zeichnen()
{
    this-&gt;transform();
    glutWireSphere(this-&gt;radius, 30, 30);

}

public: void next(long zeit)
{

    this-&gt;zeit = zeit;
    this-&gt;zeichnen();

}
</code></pre>
<pre><code>class rotate_objekt :public static_objekt
{
float radius;
float eigenrotation;
float umlauf;
float abstand;
float ellipse;
static_objekt* travon;
public: rotate_objekt(float radius, float eigenrotation, float umlauf, float abstand, float ellipse, static_objekt* travon):static_objekt()
{
    this-&gt;radius = radius;
    this-&gt;eigenrotation = eigenrotation;
    this-&gt;umlauf = umlauf;
    this-&gt;abstand = abstand;
    this-&gt;ellipse = ellipse;
    this-&gt;travon = travon;

}

void position()
{
        glTranslatef(-3,-4,0);
}

};
</code></pre>
<p>ich will, dass rotate objekt von static objekt erbt, und die funktionen nutzen kann. aber void position() soll er neu definieren....<br />
hoffe ich drücke mich verständlich aus.</p>
<p>kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794619</guid><dc:creator><![CDATA[Szill]]></dc:creator><pubDate>Mon, 19 Oct 2009 07:49:57 GMT</pubDate></item><item><title><![CDATA[Reply to Anfänger Frage on Mon, 19 Oct 2009 08:26:39 GMT]]></title><description><![CDATA[<p>Sowas?</p>
<pre><code class="language-cpp">class StaticObject
{
public:
  virtual ~StaticObject() {}

  // ...

  virtual void Position() {}
}

class RotatedObject : public StaticObject
{
public:
  /*virtual*/ void Position()
  {
    // hier die spezielle implementierung
  }
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1794631</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794631</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Mon, 19 Oct 2009 08:26:39 GMT</pubDate></item><item><title><![CDATA[Reply to Anfänger Frage on Mon, 19 Oct 2009 09:36:09 GMT]]></title><description><![CDATA[<p>ahh ^^ irgendwie tuts jetzt...<br />
danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794663</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794663</guid><dc:creator><![CDATA[Szill]]></dc:creator><pubDate>Mon, 19 Oct 2009 09:36:09 GMT</pubDate></item></channel></rss>