<?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[member function von base class wird nicht gefunden]]></title><description><![CDATA[<p>hallo leute</p>
<p>scheinbar steht ich mal wieder voll auf der leitung das es schon weh tut.</p>
<p>VC2015 haut mir immer fogende Fehler raus:</p>
<pre><code>(1)error C2660: &quot;txl::gui::window_rect::width&quot;: Funktion akzeptiert keine 0 Argumente
(2)error C2660: &quot;SetWindowPos&quot;: Funktion akzeptiert keine 6 Argumente
</code></pre>
<p>hier der relevante code: (beide fehler sind hier in zeile 98)</p>
<pre><code>//header
class virtual_rect
{
   public:
      virtual_rect(void) noexcept;
      virtual_rect(const virtual_rect&amp;) = delete;
      virtual_rect(virtual_rect&amp;&amp;) = delete;
      virtual ~virtual_rect(void) noexcept;

      auto operator=(const virtual_rect&amp;) -&gt; virtual_rect&amp; = delete;
      auto operator=(virtual_rect&amp;&amp;) -&gt; virtual_rect&amp; = delete;

      auto rect(void) const noexcept -&gt; const txl::gui::rect&amp;;

      auto left(void) const noexcept -&gt; rect::value_type;
      auto top(void) const noexcept -&gt; rect::value_type;
      auto right(void) const noexcept -&gt; rect::value_type;
      auto bottom(void) const noexcept -&gt; rect::value_type;

      virtual auto left(rect::value_type v) noexcept -&gt; void;
      virtual auto top(rect::value_type v) noexcept -&gt; void;
      virtual auto right(rect::value_type v) noexcept -&gt; void;
      virtual auto bottom(rect::value_type v) noexcept -&gt; void;

      auto width(void) const noexcept -&gt; rect::value_type;
      auto height(void) const noexcept -&gt; rect::value_type;
      virtual auto width(rect::value_type w) noexcept -&gt; void;
      virtual auto height(rect::value_type h) noexcept -&gt; void;

      virtual auto resize(rect::value_type w, rect::value_type h) noexcept -&gt; void;
      virtual auto resize(const rect::size &amp;s) noexcept -&gt; void;
      virtual auto move(rect::value_type x, rect::value_type y) noexcept -&gt; void;
      virtual auto move(const distance &amp;d) noexcept -&gt; void;
      virtual auto position(rect::value_type x, rect::value_type y) noexcept -&gt; void;
      virtual auto position(const point &amp;p) noexcept -&gt; void;
      auto position(void) noexcept -&gt; point;
      auto size(void) const noexcept -&gt; rect::size;
      auto origin(void) noexcept -&gt; point;

      auto vertex(rect::vertices::value_type v) const noexcept -&gt; point;

      virtual auto update(void) noexcept -&gt; bool;

   protected:
      txl::gui::rect m_rect;
      rect::vertices::value_type m_origin;
}; /* class virtual_rect */

class window_rect : public virtual_rect
{
   public:
      window_rect(base_window &amp;w) noexcept;
      window_rect(const window_rect&amp;) = delete;
      window_rect(window_rect&amp;&amp;) = delete;
      virtual ~window_rect(void) noexcept;

      auto operator=(window_rect&amp;) -&gt; window_rect&amp; = delete;
      auto operator=(window_rect&amp;&amp;) -&gt; window_rect&amp; = delete;

      virtual auto left(rect::value_type v) noexcept -&gt; void;
      virtual auto top(rect::value_type v) noexcept -&gt; void;
      virtual auto right(rect::value_type v) noexcept -&gt; void;
      virtual auto bottom(rect::value_type v) noexcept -&gt; void;

      virtual auto width(rect::value_type w) noexcept -&gt; void;
      virtual auto height(rect::value_type h) noexcept -&gt; void;

      virtual auto resize(rect::value_type w, rect::value_type h) noexcept -&gt; void;
      virtual auto resize(const rect::size &amp;s) noexcept -&gt; void;
      virtual auto move(rect::value_type x, rect::value_type y) noexcept -&gt; void;
      virtual auto move(const distance &amp;d) noexcept -&gt; void;
      virtual auto position(rect::value_type x, rect::value_type y) noexcept -&gt; void;
      virtual auto position(const point &amp;p) noexcept -&gt; void;

      virtual auto update(void) noexcept -&gt; bool;

   private:
      base_window &amp;m_base_window;

      auto change_rect_member(rect::value_type *member, rect::value_type value) noexcept -&gt; void;
}; /* class window_rect */

// CPP datei
auto window_rect::update(void) noexcept -&gt; bool
{
   if(!(m_base_window.m_flags &amp; (window_flags::position_changed | window_flags::size_changed)))
      return true;

   int f = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOREPOSITION | SWP_NOZORDER;

   if(!(m_base_window.m_flags &amp; window_flags::position_changed))
      f |= SWP_NOMOVE;

   if(!(m_base_window.m_flags &amp; window_flags::size_changed))
      f |= SWP_NOSIZE;

   BOOL res = SetWindowPos(m_base_window.handle(), 0, m_rect.left, m_rect.top, this-&gt;width(), virtual_rect::height(), f);
   return res != 0;
}
</code></pre>
<p>bei dem aufruf von height() kommt auch der fehler wie bei width. wenn ich aber die basisklasse mit angebe, dann ist alles ok.</p>
<p>wo liegt da der fehler ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/336496/member-function-von-base-class-wird-nicht-gefunden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 09:01:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/336496.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Jan 2016 12:20:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to member function von base class wird nicht gefunden on Tue, 26 Jan 2016 12:20:23 GMT]]></title><description><![CDATA[<p>hallo leute</p>
<p>scheinbar steht ich mal wieder voll auf der leitung das es schon weh tut.</p>
<p>VC2015 haut mir immer fogende Fehler raus:</p>
<pre><code>(1)error C2660: &quot;txl::gui::window_rect::width&quot;: Funktion akzeptiert keine 0 Argumente
(2)error C2660: &quot;SetWindowPos&quot;: Funktion akzeptiert keine 6 Argumente
</code></pre>
<p>hier der relevante code: (beide fehler sind hier in zeile 98)</p>
<pre><code>//header
class virtual_rect
{
   public:
      virtual_rect(void) noexcept;
      virtual_rect(const virtual_rect&amp;) = delete;
      virtual_rect(virtual_rect&amp;&amp;) = delete;
      virtual ~virtual_rect(void) noexcept;

      auto operator=(const virtual_rect&amp;) -&gt; virtual_rect&amp; = delete;
      auto operator=(virtual_rect&amp;&amp;) -&gt; virtual_rect&amp; = delete;

      auto rect(void) const noexcept -&gt; const txl::gui::rect&amp;;

      auto left(void) const noexcept -&gt; rect::value_type;
      auto top(void) const noexcept -&gt; rect::value_type;
      auto right(void) const noexcept -&gt; rect::value_type;
      auto bottom(void) const noexcept -&gt; rect::value_type;

      virtual auto left(rect::value_type v) noexcept -&gt; void;
      virtual auto top(rect::value_type v) noexcept -&gt; void;
      virtual auto right(rect::value_type v) noexcept -&gt; void;
      virtual auto bottom(rect::value_type v) noexcept -&gt; void;

      auto width(void) const noexcept -&gt; rect::value_type;
      auto height(void) const noexcept -&gt; rect::value_type;
      virtual auto width(rect::value_type w) noexcept -&gt; void;
      virtual auto height(rect::value_type h) noexcept -&gt; void;

      virtual auto resize(rect::value_type w, rect::value_type h) noexcept -&gt; void;
      virtual auto resize(const rect::size &amp;s) noexcept -&gt; void;
      virtual auto move(rect::value_type x, rect::value_type y) noexcept -&gt; void;
      virtual auto move(const distance &amp;d) noexcept -&gt; void;
      virtual auto position(rect::value_type x, rect::value_type y) noexcept -&gt; void;
      virtual auto position(const point &amp;p) noexcept -&gt; void;
      auto position(void) noexcept -&gt; point;
      auto size(void) const noexcept -&gt; rect::size;
      auto origin(void) noexcept -&gt; point;

      auto vertex(rect::vertices::value_type v) const noexcept -&gt; point;

      virtual auto update(void) noexcept -&gt; bool;

   protected:
      txl::gui::rect m_rect;
      rect::vertices::value_type m_origin;
}; /* class virtual_rect */

class window_rect : public virtual_rect
{
   public:
      window_rect(base_window &amp;w) noexcept;
      window_rect(const window_rect&amp;) = delete;
      window_rect(window_rect&amp;&amp;) = delete;
      virtual ~window_rect(void) noexcept;

      auto operator=(window_rect&amp;) -&gt; window_rect&amp; = delete;
      auto operator=(window_rect&amp;&amp;) -&gt; window_rect&amp; = delete;

      virtual auto left(rect::value_type v) noexcept -&gt; void;
      virtual auto top(rect::value_type v) noexcept -&gt; void;
      virtual auto right(rect::value_type v) noexcept -&gt; void;
      virtual auto bottom(rect::value_type v) noexcept -&gt; void;

      virtual auto width(rect::value_type w) noexcept -&gt; void;
      virtual auto height(rect::value_type h) noexcept -&gt; void;

      virtual auto resize(rect::value_type w, rect::value_type h) noexcept -&gt; void;
      virtual auto resize(const rect::size &amp;s) noexcept -&gt; void;
      virtual auto move(rect::value_type x, rect::value_type y) noexcept -&gt; void;
      virtual auto move(const distance &amp;d) noexcept -&gt; void;
      virtual auto position(rect::value_type x, rect::value_type y) noexcept -&gt; void;
      virtual auto position(const point &amp;p) noexcept -&gt; void;

      virtual auto update(void) noexcept -&gt; bool;

   private:
      base_window &amp;m_base_window;

      auto change_rect_member(rect::value_type *member, rect::value_type value) noexcept -&gt; void;
}; /* class window_rect */

// CPP datei
auto window_rect::update(void) noexcept -&gt; bool
{
   if(!(m_base_window.m_flags &amp; (window_flags::position_changed | window_flags::size_changed)))
      return true;

   int f = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOREPOSITION | SWP_NOZORDER;

   if(!(m_base_window.m_flags &amp; window_flags::position_changed))
      f |= SWP_NOMOVE;

   if(!(m_base_window.m_flags &amp; window_flags::size_changed))
      f |= SWP_NOSIZE;

   BOOL res = SetWindowPos(m_base_window.handle(), 0, m_rect.left, m_rect.top, this-&gt;width(), virtual_rect::height(), f);
   return res != 0;
}
</code></pre>
<p>bei dem aufruf von height() kommt auch der fehler wie bei width. wenn ich aber die basisklasse mit angebe, dann ist alles ok.</p>
<p>wo liegt da der fehler ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2484744</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2484744</guid><dc:creator><![CDATA[Meep Meep]]></dc:creator><pubDate>Tue, 26 Jan 2016 12:20:23 GMT</pubDate></item><item><title><![CDATA[Reply to member function von base class wird nicht gefunden on Tue, 26 Jan 2016 12:32:43 GMT]]></title><description><![CDATA[<p><code>width</code> (bzw. <code>height</code> ) wird in <code>window_rect</code> als ein für diesen lookup gültiges Resultat deklariert, daher hört lookup dort auch auf (siehe <a href="http://eel.is/c++draft/class.member.lookup#4" rel="nofollow">[class.member.lookup]/4</a>. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> Basisklasse angeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2484748</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2484748</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Tue, 26 Jan 2016 12:32:43 GMT</pubDate></item><item><title><![CDATA[Reply to member function von base class wird nicht gefunden on Tue, 26 Jan 2016 12:40:02 GMT]]></title><description><![CDATA[<p>Arcoth schrieb:</p>
<blockquote>
<p><code>width</code> (bzw. <code>height</code> ) wird in <code>window_rect</code> als ein für diesen lookup gültiges Resultat deklariert, daher hört lookup dort auch auf (siehe <a href="http://eel.is/c++draft/class.member.lookup#4" rel="nofollow">[class.member.lookup]/4</a>. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> Basisklasse angeben.</p>
</blockquote>
<p>und wenn ich mal eine memberfunction einer femdklasse verwenden will, muss cih zuerst nachschauen, in welcher klasse die member funktion deklariert worden ist, damit ich sie aufrufen kann ??<br />
entweder hab ich all die jahre noch nie member funktionen von basisklassen aufgerufen oder das ist neu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2484749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2484749</guid><dc:creator><![CDATA[Meep Meep]]></dc:creator><pubDate>Tue, 26 Jan 2016 12:40:02 GMT</pubDate></item><item><title><![CDATA[Reply to member function von base class wird nicht gefunden on Tue, 26 Jan 2016 13:00:03 GMT]]></title><description><![CDATA[<p>Meep Meep schrieb:</p>
<blockquote>
<p>entweder hab ich all die jahre noch nie member funktionen von basisklassen aufgerufen oder das ist neu</p>
</blockquote>
<p>Nein, das ist nicht neu. Der Name wird eben verdeckt, den Effekt hast du sicherlich schon beobachtet?</p>
<pre><code>struct B     {int i();   };
struct A : B {int i(int);};

int main() {A().i();}
</code></pre>
<p>( <code>virtual</code> spielt dabei selbstverständlich keine Rolle)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2484753</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2484753</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Tue, 26 Jan 2016 13:00:03 GMT</pubDate></item><item><title><![CDATA[Reply to member function von base class wird nicht gefunden on Tue, 26 Jan 2016 13:06:15 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">using virtual_rect::width;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2484754</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2484754</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Tue, 26 Jan 2016 13:06:15 GMT</pubDate></item><item><title><![CDATA[Reply to member function von base class wird nicht gefunden on Tue, 26 Jan 2016 13:38:00 GMT]]></title><description><![CDATA[<p>LordJaxom schrieb:</p>
<blockquote>
<pre><code class="language-cpp">using virtual_rect::width;
</code></pre>
</blockquote>
<p>genau <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/2484759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2484759</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 26 Jan 2016 13:38:00 GMT</pubDate></item></channel></rss>