<?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[Variable Argumentliste im Vererbungskonstruktor weiterreichen?]]></title><description><![CDATA[<p>Huhu!<br />
Ich habe folgende abstrakte Klasse:</p>
<pre><code class="language-cpp">class ToggleCheat : public Cheat
{
public:
	ToggleCheat(HANDLE hProcess, string description, int adress, int num_bytes, ...);
	~ToggleCheat();

	virtual void Toggle() = 0;

protected:
	bool cheat_is_active;
};
</code></pre>
<p>Und eine Klasse die davon Erben soll:</p>
<pre><code class="language-cpp">class InjectionCheat : public ToggleCheat
{
public:
	InjectionCheat(HANDLE hProcess, string description, int adress, int num_bytes, ...);
	~InjectionCheat();

private:
	BYTE* bytes_original;
	BYTE* bytes_custom;

};
</code></pre>
<p>Ich möchte nun, dass die variable Argumentliste bei der Definition von InjectionCheat an ToggleCheat weitergereicht wird. Ist das überhaupt möglich? Wenn ja, wie?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/269429/variable-argumentliste-im-vererbungskonstruktor-weiterreichen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 31 Aug 2026 10:00:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/269429.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Jun 2010 19:01:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:01:08 GMT]]></title><description><![CDATA[<p>Huhu!<br />
Ich habe folgende abstrakte Klasse:</p>
<pre><code class="language-cpp">class ToggleCheat : public Cheat
{
public:
	ToggleCheat(HANDLE hProcess, string description, int adress, int num_bytes, ...);
	~ToggleCheat();

	virtual void Toggle() = 0;

protected:
	bool cheat_is_active;
};
</code></pre>
<p>Und eine Klasse die davon Erben soll:</p>
<pre><code class="language-cpp">class InjectionCheat : public ToggleCheat
{
public:
	InjectionCheat(HANDLE hProcess, string description, int adress, int num_bytes, ...);
	~InjectionCheat();

private:
	BYTE* bytes_original;
	BYTE* bytes_custom;

};
</code></pre>
<p>Ich möchte nun, dass die variable Argumentliste bei der Definition von InjectionCheat an ToggleCheat weitergereicht wird. Ist das überhaupt möglich? Wenn ja, wie?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916957</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916957</guid><dc:creator><![CDATA[Stephan86]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:01:08 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:26:32 GMT]]></title><description><![CDATA[<p>Hast du es mit:</p>
<pre><code class="language-cpp">// cpp-datei
InjectionCheat::InjectionCheat(HANDLE hProcess, string description, int adress):ToggleCheat(int num_bytes, ...){
//
}
</code></pre>
<p>Probiert?</p>
<p>Nachtrag:<br />
Nein geht doch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916969</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916969</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:26:32 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:28:25 GMT]]></title><description><![CDATA[<p>Dazu braucht man<br />
<a href="http://www.cplusplus.com/reference/clibrary/cstdarg/va_list/" rel="nofollow">http://www.cplusplus.com/reference/clibrary/cstdarg/va_list/</a><br />
und Konsorten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916971</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916971</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:28:25 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:32:53 GMT]]></title><description><![CDATA[<p>Was spricht eigentlich dagegen einen Vector durchzureichen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916976</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916976</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:32:53 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:38:16 GMT]]></title><description><![CDATA[<p><a href="http://www.coding-board.de/board/showthread.php?t=16673" rel="nofollow">http://www.coding-board.de/board/showthread.php?t=16673</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916980</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916980</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:38:16 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:40:40 GMT]]></title><description><![CDATA[<p>Shade Of Mine schrieb:</p>
<blockquote>
<p>Dazu braucht man<br />
<a href="http://www.cplusplus.com/reference/clibrary/cstdarg/va_list/" rel="nofollow">http://www.cplusplus.com/reference/clibrary/cstdarg/va_list/</a><br />
und Konsorten.</p>
</blockquote>
<p>Damit kriegt man die ellipse aber doch auch nicht weitergereicht?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916981</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916981</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:40:40 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:41:11 GMT]]></title><description><![CDATA[<p>darkfate schrieb:</p>
<blockquote>
<p>Shade Of Mine schrieb:</p>
<blockquote>
<p>Dazu braucht man<br />
<a href="http://www.cplusplus.com/reference/clibrary/cstdarg/va_list/" rel="nofollow">http://www.cplusplus.com/reference/clibrary/cstdarg/va_list/</a><br />
und Konsorten.</p>
</blockquote>
<p>Damit kriegt man die ellipse aber doch auch nicht weitergereicht?!</p>
</blockquote>
<p>Aber du kannst die va_list weiterrreichen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916982</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916982</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:41:11 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:47:43 GMT]]></title><description><![CDATA[<p>Shade Of Mine schrieb:</p>
<blockquote>
<p>darkfate schrieb:</p>
<blockquote>
<p>Shade Of Mine schrieb:</p>
<blockquote>
<p>Dazu braucht man<br />
<a href="http://www.cplusplus.com/reference/clibrary/cstdarg/va_list/" rel="nofollow">http://www.cplusplus.com/reference/clibrary/cstdarg/va_list/</a><br />
und Konsorten.</p>
</blockquote>
<p>Damit kriegt man die ellipse aber doch auch nicht weitergereicht?!</p>
</blockquote>
<p>Aber du kannst die va_list weiterrreichen...</p>
</blockquote>
<pre><code class="language-cpp">class A{
public:
	A(int num_bytes, va_list valist);
}; 

class B : public A{
public:
	B(double a, int num_bytes, ...);

}; 

B::B(double a, int num_bytes, ...):A(num_bytes, va_arg){ }
</code></pre>
<p>Weder die Zeile 3 noch Zeile 12 wird akzeptiert.<br />
So geht das zumindest nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916986</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916986</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:47:43 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:47:08 GMT]]></title><description><![CDATA[<p>Nun, mein Problem ist folgendes:</p>
<p>Ich möchte eine gewisse Menge von Bytes in den Arbeitsspeicher schreiben. Bei Arrays geht das ja recht cool:</p>
<pre><code class="language-cpp">BYTE arr[] = {0x90, 0x12, 0x15, 0x24}
WriteProcessMemory(Process, adress, arr, 4, 0);
</code></pre>
<p>Allerdings geht diese Notation ja leider nur bei der Initialisierung.</p>
<p>einfach</p>
<pre><code class="language-cpp">void foo(BYTE arr[]) {...}

foo({0x90, 0x12, 0x15, 0x24})
</code></pre>
<p>geht ja nicht, daher will ich das mit einer variablen Argumentliste machen, um mir hässliche Konstrukte wie:</p>
<pre><code class="language-cpp">BYTE arr1[] = {0x90, 0x12, 0x15, 0x24}
foo(arr1)

BYTE arr2[] = {0x12, 0x34, 0x56, 0x78}
foo(arr2)

...
</code></pre>
<p>Zu ersparen sondern einfach nur</p>
<pre><code class="language-cpp">foo(4, 0x90, 0x12, 0x15, 0x24)
foo(4, 0x12, 0x34, 0x56, 0x78)

...
</code></pre>
<p>machen zu können, wobei ich das mit der Übergabe der zu verarbeiten Argumente (im Beispiel 4) auch etwas doof finde. Am liebsten hätte ich das auch noch irgendwie automatisiert ermittelt.<br />
So etwas wie bei der Arrayinitialisierung fände ich daher optimal.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916988</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916988</guid><dc:creator><![CDATA[Stephan86]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:47:08 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:50:29 GMT]]></title><description><![CDATA[<p>Stephan86 schrieb:</p>
<blockquote>
<p>Nun, mein Problem ist folgendes:</p>
<p>Ich möchte eine gewisse Menge von Bytes in den Arbeitsspeicher schreiben. Bei Arrays geht das ja recht cool:</p>
</blockquote>
<p>Dann reiche doch das Array und dessen Dimension(en) weiter?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916990</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916990</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:50:29 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:55:00 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/22362">@darkfate</a>:</p>
<pre><code class="language-cpp">void f(va_list l);

void f2(int i, ...) {
  va_list l;
  va_start(l, i);
  f(l);
  va_end(l);
}
</code></pre>
<p>@Stephan86:<br />
<a href="http://www.drdobbs.com/article/printableArticle.jhtml;jsessionid=FK1ACWGV5RUUBQE1GHPSKHWATMY32JVN?articleId=184403542&amp;dept_url=/architecture-and-design/" rel="nofollow">http://www.drdobbs.com/article/printableArticle.jhtml;jsessionid=FK1ACWGV5RUUBQE1GHPSKHWATMY32JVN?articleId=184403542&amp;dept_url=/architecture-and-design/</a><br />
oder<br />
<a href="http://www.codeproject.com/KB/stl/PGIL.aspx" rel="nofollow">http://www.codeproject.com/KB/stl/PGIL.aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916992</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916992</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:55:00 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 19:57:28 GMT]]></title><description><![CDATA[<p>Ich weiß ja in der Regel nicht wie groß mein Array ist. Das können mal gut und gerne 30 Werte sein. Jedesmal durchzählen ist zum einen mühleelig und zum anderen Fehleranfällig.</p>
<p>Wie gesagt will ich ja Konstrukte wie</p>
<pre><code class="language-cpp">BYTE GodOneHitInjcCave[] = { 0x56, 0x8B, 0x35, 0x8C, 0xF9, 0x01, 0x11, 0x83, 0xFE, 0x01,
									 0x8B, 0xF0, 0x75, 0x0D, 0x39, 0x1D, 0x43, 0xF9, 0x01, 0x11, 
									 0x74, 0x05, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x56, 0x8B, 0x35, 
									 0x88, 0xF9, 0x01, 0x11, 0x83, 0xFE, 0x01, 0x5E, 0x75, 0x08, 
									 0x39, 0x1D, 0x43, 0xF9, 0x01, 0x11, 0x74, 0x02, 0x89, 0x33, 
									 0x5E, 0x8B, 0xD8, 0x8B, 0x44, 0x24, 0x14, 0xE9, 0xCA, 0x29, 
									 0xCD, 0xFF }; 

foo(GodOneHitInjcCave)
</code></pre>
<p>vermeiden und hätte die Definition der Bytes gerne direkt in foo().</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916994</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916994</guid><dc:creator><![CDATA[Stephan86]]></dc:creator><pubDate>Thu, 24 Jun 2010 19:57:28 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 20:04:11 GMT]]></title><description><![CDATA[<p>Shade Of Mine schrieb:</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/22362">@darkfate</a>:</p>
<pre><code class="language-cpp">void f(va_list l);

void f2(int i, ...) {
  va_list l;
  va_start(l, i);
  f(l);
  va_end(l);
}
</code></pre>
<p>@Stephan86:<br />
<a href="http://www.drdobbs.com/article/printableArticle.jhtml;jsessionid=FK1ACWGV5RUUBQE1GHPSKHWATMY32JVN?articleId=184403542&amp;dept_url=/architecture-and-design/" rel="nofollow">http://www.drdobbs.com/article/printableArticle.jhtml;jsessionid=FK1ACWGV5RUUBQE1GHPSKHWATMY32JVN?articleId=184403542&amp;dept_url=/architecture-and-design/</a><br />
oder<br />
<a href="http://www.codeproject.com/KB/stl/PGIL.aspx" rel="nofollow">http://www.codeproject.com/KB/stl/PGIL.aspx</a></p>
</blockquote>
<p>Ich bin eigentlich von dem hier ausgegangen:</p>
<p>Stephan86 schrieb:</p>
<blockquote>
<p>Ich möchte nun, dass die variable Argumentliste <strong>bei der Definition von InjectionCheat an ToggleCheat weitergereicht wird</strong>. Ist das überhaupt möglich? Wenn ja, wie?</p>
</blockquote>
<p>Dazu müsste doch die va_list durch den Konstruktor?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916997</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916997</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Thu, 24 Jun 2010 20:04:11 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 20:05:07 GMT]]></title><description><![CDATA[<p>Stephan86 schrieb:</p>
<blockquote>
<p>Wie gesagt will ich ja Konstrukte wie</p>
<pre><code class="language-cpp">BYTE GodOneHitInjcCave[] = { 0x56, 0x8B, 0x35, 0x8C, 0xF9, 0x01, 0x11, 0x83, 0xFE, 0x01,
									 0x8B, 0xF0, 0x75, 0x0D, 0x39, 0x1D, 0x43, 0xF9, 0x01, 0x11, 
									 0x74, 0x05, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x56, 0x8B, 0x35, 
									 0x88, 0xF9, 0x01, 0x11, 0x83, 0xFE, 0x01, 0x5E, 0x75, 0x08, 
									 0x39, 0x1D, 0x43, 0xF9, 0x01, 0x11, 0x74, 0x02, 0x89, 0x33, 
									 0x5E, 0x8B, 0xD8, 0x8B, 0x44, 0x24, 0x14, 0xE9, 0xCA, 0x29, 
									 0xCD, 0xFF }; 

foo(GodOneHitInjcCave)
</code></pre>
<p>vermeiden und hätte die Definition der Bytes gerne direkt in foo().</p>
</blockquote>
<p>und warum??</p>
<p>irgendwie schreit so ein großer Block Daten doch danach einen Namen zu bekommen. Hast du ja in foo(GodOneHitInjcCave); gemacht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1916998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916998</guid><dc:creator><![CDATA[DrGreenthumb]]></dc:creator><pubDate>Thu, 24 Jun 2010 20:05:07 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 20:08:23 GMT]]></title><description><![CDATA[<p>Stephan86 schrieb:</p>
<blockquote>
<p>Ich weiß ja in der Regel nicht wie groß mein Array ist. Das können mal gut und gerne 30 Werte sein. Jedesmal durchzählen ist zum einen mühleelig und zum anderen Fehleranfällig.</p>
</blockquote>
<pre><code class="language-cpp">count = sizeof(array)/sizeof(double);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1916999</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1916999</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Thu, 24 Jun 2010 20:08:23 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 20:12:36 GMT]]></title><description><![CDATA[<p>darkfate schrieb:</p>
<blockquote>
<p>Dazu müsste doch die va_list durch den Konstruktor?</p>
</blockquote>
<p>Ja.</p>
<p>... kann man schwer verwenden. Man muss ... in etwas umwandeln dass man angreifen kann. Die va_list ist dabei die angreifbare Form von ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1917003</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917003</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Thu, 24 Jun 2010 20:12:36 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 20:29:56 GMT]]></title><description><![CDATA[<p>Shade Of Mine schrieb:</p>
<blockquote>
<p>... kann man schwer verwenden. Man muss ... in etwas umwandeln dass man angreifen kann. Die va_list ist dabei die angreifbare Form von ...</p>
</blockquote>
<p>?!?</p>
<p>Könntest du das in Code ausdrücken? Bzw. hier ergänzen.</p>
<pre><code class="language-cpp">#include &lt;cstdarg&gt;
#include &lt;vector&gt;

class A{
private:
	std::vector&lt;double&gt; vals;
public:
	A(int size, va_list vl);
};

A::A(int size, va_list vl){
	va_start(vl, size);
	vals.push_back(va_arg(vl,double));
	va_end(vl); 
}

class B : public A{ public: B(int size, va_list vl ); };

B::B(int size, va_list vl):A(size, vl){ }

int main(){
	va_list vl()
	B classb(3,va_list(1.0,2.0,3.0));
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1917008</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917008</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Thu, 24 Jun 2010 20:29:56 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 20:58:13 GMT]]></title><description><![CDATA[<p>naja, prinzipiell:</p>
<pre><code class="language-cpp">B* makeB (int size, ...) {
   va_list ap;
   return new B (size, ap);
}
</code></pre>
<p>aber das ist alles mist mit diesen va_lists in konstruktoren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1917015</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917015</guid><dc:creator><![CDATA[DrGreenthumb]]></dc:creator><pubDate>Thu, 24 Jun 2010 20:58:13 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 21:06:26 GMT]]></title><description><![CDATA[<p>darkfate schrieb:</p>
<blockquote>
<p>Könntest du das in Code ausdrücken? Bzw. hier ergänzen.</p>
</blockquote>
<p>Ah, ich sehe was du meinst.<br />
Ja, da muss man wohl auf eine init() Funktion zurueck greifen, da man die va_list nicht in der initliste definieren kann.<br />
Oder eine globale Variable verwenden.</p>
<pre><code class="language-cpp">#include &lt;cstdarg&gt;
#include &lt;vector&gt;
va_list helper;

class A{
private:
    std::vector&lt;double&gt; vals;
public:
    A(int size, va_list vl);
};

A::A(int size, va_list vl){
    vals.push_back(va_arg(vl,double));
}

class B : public A{ public: B(int size, ...); };

B::B(int size, ...):A(size, (va_start(helper,size),helper)){ }

int main(){
    B classb(3,1.0,2.0,3.0);
}
</code></pre>
<p>gewinnt aber wohl keine Preise.</p>
<p>Besser doch boost.Assign oder inline_container verwenden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1917020</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917020</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Thu, 24 Jun 2010 21:06:26 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Thu, 24 Jun 2010 21:28:02 GMT]]></title><description><![CDATA[<p>Shade Of Mine schrieb:</p>
<blockquote>
<p>Oder eine globale Variable verwenden.</p>
</blockquote>
<p>nee voll nicht, lieber eine funktion.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1917031</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917031</guid><dc:creator><![CDATA[DrGreenthumb]]></dc:creator><pubDate>Thu, 24 Jun 2010 21:28:02 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Fri, 25 Jun 2010 05:39:07 GMT]]></title><description><![CDATA[<p>Ich glaube man lässt va_lists ganz weg.<br />
Sie existieren doch nur noch aus Kompatibilitätsgründen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1917076</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917076</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Fri, 25 Jun 2010 05:39:07 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Fri, 25 Jun 2010 06:32:33 GMT]]></title><description><![CDATA[<p>Stephan86 schrieb:</p>
<blockquote>
<p>Ich möchte nun, dass die variable Argumentliste bei der Definition von InjectionCheat an ToggleCheat weitergereicht wird. Ist das überhaupt möglich? Wenn ja, wie?</p>
</blockquote>
<p>Ellipsen sich nicht typsicher und daher grundsätzlich zu vermeiden. Sie sind Teil von C++ um mit C kompatibel zu sein. Also, denke Dir eine Alternative Lösung aus - <strong>ohne</strong> Ellipsen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1917087</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917087</guid><dc:creator><![CDATA[*john 0]]></dc:creator><pubDate>Fri, 25 Jun 2010 06:32:33 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Fri, 25 Jun 2010 08:06:32 GMT]]></title><description><![CDATA[<p>DrGreenthumb schrieb:</p>
<blockquote>
<p>nee voll nicht, lieber eine funktion.</p>
</blockquote>
<p>Das habe ich mir am Anfang gedacht, dass man die va_list einfach über eine Funktion befüllen kann - aber ich bin auf keine Lösung gekommen.</p>
<p>Hast du eine?</p>
<p>PS:<br />
Wie man das ohne Ellipsen machen kann habe ich bereits gepostet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1917110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917110</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Fri, 25 Jun 2010 08:06:32 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Fri, 25 Jun 2010 08:25:34 GMT]]></title><description><![CDATA[<p>Shade Of Mine schrieb:</p>
<blockquote>
<p>DrGreenthumb schrieb:</p>
<blockquote>
<p>nee voll nicht, lieber eine funktion.</p>
</blockquote>
<p>Das habe ich mir am Anfang gedacht, dass man die va_list einfach über eine Funktion befüllen kann - aber ich bin auf keine Lösung gekommen.</p>
<p>Hast du eine?</p>
<p>PS:<br />
Wie man das ohne Ellipsen machen kann habe ich bereits gepostet.</p>
</blockquote>
<p>Unter C weiß ich zumindest dass so ein Vorgehen nicht vorgesehen ist.<br />
Unter C++ existiert es nur aus Kompatibilitätsgründen.<br />
In GNU C++ ist es soweit ich weiß auf dem sterbenen Ast (deprecated).<br />
Es lässt sich auch in C bequem durch die Übergabe eines Arrays umgehen.</p>
<pre><code class="language-cpp">//Deklaration
typ in_vect(typ vect[], int size); // Eindimensional
typ in_matrix(typ matrix[][dim2], int size); // Mehrdimensional
//Aufruf
in_vect(typ *vect,sizeof(vect)/sizeof(vect[0]); //Eindimensional
in_matrix(typ *matrix[dim2],dim1); // Mehrdimensioinal
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1917115</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917115</guid><dc:creator><![CDATA[darkfate]]></dc:creator><pubDate>Fri, 25 Jun 2010 08:25:34 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Fri, 25 Jun 2010 09:45:26 GMT]]></title><description><![CDATA[<p>darkfate schrieb:</p>
<blockquote>
<p>Unter C weiß ich zumindest dass so ein Vorgehen nicht vorgesehen ist.<br />
Unter C++ existiert es nur aus Kompatibilitätsgründen.<br />
In GNU C++ ist es soweit ich weiß auf dem sterbenen Ast (deprecated).<br />
Es lässt sich auch in C bequem durch die Übergabe eines Arrays umgehen.</p>
</blockquote>
<p>Ein Array ist kein Ersatz für variadic Funktionen. Zumindest nicht immer.</p>
<p>Die korrekte Lösung habe ich ja bereits gepostet:<br />
Boost.Assign oder inline_container<br />
oder eben Boost.Format ansehen - aber da habe ich keine Ahnung wie die Technik dahinter aussieht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1917164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917164</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Fri, 25 Jun 2010 09:45:26 GMT</pubDate></item><item><title><![CDATA[Reply to Variable Argumentliste im Vererbungskonstruktor weiterreichen? on Sat, 26 Jun 2010 01:01:17 GMT]]></title><description><![CDATA[<p>Shade Of Mine schrieb:</p>
<blockquote>
<p>DrGreenthumb schrieb:</p>
<blockquote>
<p>nee voll nicht, lieber eine funktion.</p>
</blockquote>
<p>Das habe ich mir am Anfang gedacht, dass man die va_list einfach über eine Funktion befüllen kann - aber ich bin auf keine Lösung gekommen.</p>
<p>Hast du eine?</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /><br />
PS:<br />
Wie man das ohne Ellipsen machen kann habe ich bereits gepostet.</p>
</blockquote>
<p>ich bezog mich hierauf:</p>
<blockquote>
<p>Ah, ich sehe was du meinst.<br />
Ja, da muss man wohl auf eine init() Funktion zurueck greifen, da man die va_list nicht in der initliste definieren kann.<br />
Oder eine globale Variable verwenden.</p>
<p>[ lange, ganz schlechte &quot;lösung&quot; mit globaler hilfs-variable ]</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1917469</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1917469</guid><dc:creator><![CDATA[DrGreenthumb]]></dc:creator><pubDate>Sat, 26 Jun 2010 01:01:17 GMT</pubDate></item></channel></rss>