<?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[L-Value &#x2F; R-Value]]></title><description><![CDATA[<p>hi,</p>
<p>gibt es eine Möglichkeit, einen Funktionsparameter auch aus einer = Zuweisung zu erhalten ?</p>
<p>statt:</p>
<pre><code class="language-cpp">variable.set(&quot;a&quot;,2.3);
</code></pre>
<p>möchte ich sowas machen können:</p>
<pre><code class="language-cpp">variable.set(&quot;a&quot;)=2.3;
</code></pre>
<p>grüße aus Peine Mirko</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/308749/l-value-r-value</link><generator>RSS for Node</generator><lastBuildDate>Wed, 05 Aug 2026 15:18:42 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/308749.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Oct 2012 13:19:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 13:19:58 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>gibt es eine Möglichkeit, einen Funktionsparameter auch aus einer = Zuweisung zu erhalten ?</p>
<p>statt:</p>
<pre><code class="language-cpp">variable.set(&quot;a&quot;,2.3);
</code></pre>
<p>möchte ich sowas machen können:</p>
<pre><code class="language-cpp">variable.set(&quot;a&quot;)=2.3;
</code></pre>
<p>grüße aus Peine Mirko</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2256991</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2256991</guid><dc:creator><![CDATA[offensiv]]></dc:creator><pubDate>Thu, 04 Oct 2012 13:19:58 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 13:22:28 GMT]]></title><description><![CDATA[<p>Nicht, wenn du den Wert (hier 2.3) in der Funktion benutzen möchtest. Warum sollte man so etwas wollen? Benutz die Sprache so, wie sie gedacht ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2256994</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2256994</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Thu, 04 Oct 2012 13:22:28 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 13:24:26 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">class int_
{
private:
    int _int;

public:
    int get() const
    {
        return _int;
    }

    int&amp; set()
    {
        return _int;
    }
};

int main()
{
    int_ foo;
    foo.set() = 12;
}
</code></pre>
<p>Mit ner Referenz. Aber nicht gerade eine schöne Sache.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2256997</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2256997</guid><dc:creator><![CDATA[Ethon]]></dc:creator><pubDate>Thu, 04 Oct 2012 13:24:26 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 13:27:14 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Nicht, wenn du den Wert (hier 2.3) in der Funktion benutzen möchtest. Warum sollte man so etwas wollen? Benutz die Sprache so, wie sie gedacht ist.</p>
</blockquote>
<p>Ist doch übersichtlicher mit der = Zuweisung. Da weis jeder der den Code sieht was geschehen soll.<br />
Ich möchte &quot;a&quot; den Wert 2.3 zuweisen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2256999</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2256999</guid><dc:creator><![CDATA[offensiv]]></dc:creator><pubDate>Thu, 04 Oct 2012 13:27:14 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 13:27:37 GMT]]></title><description><![CDATA[<p>Weniger unschön, wenn man es get statt set nennt. Denn durch den Aufruf der Methode wird noch nichts gesetzt -&gt; set als Name ist somit unlogisch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257000</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257000</guid><dc:creator><![CDATA[Eisflamme]]></dc:creator><pubDate>Thu, 04 Oct 2012 13:27:37 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 13:30:01 GMT]]></title><description><![CDATA[<p>operator[]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257002</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257002</guid><dc:creator><![CDATA[Kellerautomat]]></dc:creator><pubDate>Thu, 04 Oct 2012 13:30:01 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 13:31:34 GMT]]></title><description><![CDATA[<p>Ethon schrieb:</p>
<blockquote>
<pre><code class="language-cpp">class int_
{
private:
    int _int;

public:
    int get() const
    {
        return _int;
    }

    int&amp; set()
    {
        return _int;
    }
};

int main()
{
    int_ foo;
    foo.set() = 12;
}
</code></pre>
<p>Mit ner Referenz. Aber nicht gerade eine schöne Sache.</p>
</blockquote>
<p>So komme ich aber nicht in der Funktion set an die 12 ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257006</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257006</guid><dc:creator><![CDATA[offensiv]]></dc:creator><pubDate>Thu, 04 Oct 2012 13:31:34 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 13:31:46 GMT]]></title><description><![CDATA[<p>offensiv schrieb:</p>
<blockquote>
<p>Ich möchte &quot;a&quot; den Wert 2.3 zuweisen.</p>
</blockquote>
<p>Ganz genau, das willst du, tust es aber nicht. Deine Funktion heißt <code>set</code> , du übergibst ihr aber kein Wert. Wie will man etwas setzen ohne etwas zu haben? Da denkt man sich nur, WTF.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257007</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257007</guid><dc:creator><![CDATA[out]]></dc:creator><pubDate>Thu, 04 Oct 2012 13:31:46 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 13:42:46 GMT]]></title><description><![CDATA[<p>Wenn du nur was mit = setzen willst, warum nimmt du nicht einfach eine public membervariabel?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257013</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257013</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 04 Oct 2012 13:42:46 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 15:03:14 GMT]]></title><description><![CDATA[<p>Sofern Ihr Euch einer Karte im Geiste besinnet, anbei mit Abbildung von Schlüsseln zu Werten, so weise ich demütig auf die vom Kellerautomaten überbrachte Kunde hin, selbst wenn mich der Name von letzterem stark nach Hexenwerk dünkt.</p>
<p>Es ziehet von dannen,<br />
Der Alchimist</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257062</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257062</guid><dc:creator><![CDATA[Der Alchimist]]></dc:creator><pubDate>Thu, 04 Oct 2012 15:03:14 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 15:24:09 GMT]]></title><description><![CDATA[<p>hier mal alles ...</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;stdexcept&gt;

using namespace std;

template&lt;typename T1, typename T2&gt; class cVar
{
    private:
        static const int ARR_MAX=99;
        T1 _v1[ARR_MAX];
        T2 _v2[ARR_MAX];
        int _index;

    public:

        cVar():_index{0}
        {

        }

        void add(T1 v1,T2 v2)
        {
            if (_index&gt;=ARR_MAX) throw logic_error(&quot;array zu klein.&quot;);
            _v1[_index] = v1;
            _v2[_index] = v2;
            _index++;
        }

        T2 get(T1 v1)
        {
            for (int i=0;i&lt;_index;i++)
                if ( _v1[i]==v1 ) return _v2[i];

            throw logic_error(&quot;'&quot; +v1+ &quot;' nicht gefunden.&quot;);
        }

        void set(T1 v1,T2 v2)
        {
            for (int i=0;i&lt;_index;i++)
            {
                if ( _v1[i]==v1 ) _v2[i]=v2;
                return;
            }

            throw logic_error(&quot;'&quot; +v1+ &quot;' nicht gefunden.&quot;);

        }

        T2&amp; set2(T1 v1)
        {
            return _v2[0];
        }

};

int main()
{

    cVar&lt;string,double&gt; nvars;
    nvars.add(&quot;a&quot;);
    nvars.add(&quot;b&quot;,1.2);

    nvars.set(&quot;a&quot;,2.3);

    // todo: sowas wäre schön
    // nvars.set2(&quot;a&quot;)=2.3;

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2257066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257066</guid><dc:creator><![CDATA[offensiv]]></dc:creator><pubDate>Thu, 04 Oct 2012 15:24:09 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 15:27:06 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">T2&amp; get(T1 v1)
        {
            for (int i=0;i&lt;_index;i++)
                if ( _v1[i]==v1 ) return _v2[i];

            throw logic_error(&quot;'&quot; +v1+ &quot;' nicht gefunden.&quot;);
        } 

...

nvars.get(&quot;a&quot;)=2.3;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2257067</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257067</guid><dc:creator><![CDATA[otze_logout]]></dc:creator><pubDate>Thu, 04 Oct 2012 15:27:06 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 15:28:36 GMT]]></title><description><![CDATA[<p>Schau dir mal an, wie die <code>std::map</code> aufgebaut ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257068</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257068</guid><dc:creator><![CDATA[mappppppppppp]]></dc:creator><pubDate>Thu, 04 Oct 2012 15:28:36 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 16:40:38 GMT]]></title><description><![CDATA[<p>otze_logout schrieb:</p>
<blockquote>
<pre><code class="language-cpp">T2&amp; get(T1 v1)
        {
            for (int i=0;i&lt;_index;i++)
                if ( _v1[i]==v1 ) return _v2[i];

            throw logic_error(&quot;'&quot; +v1+ &quot;' nicht gefunden.&quot;);
        } 

...

nvars.get(&quot;a&quot;)=2.3;
</code></pre>
</blockquote>
<p>compiliert er zwar, aber ich möchte ja die 2.3 meinem array von T2 zuweisen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257090</guid><dc:creator><![CDATA[offensiv]]></dc:creator><pubDate>Thu, 04 Oct 2012 16:40:38 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 16:41:36 GMT]]></title><description><![CDATA[<p>mappppppppppp schrieb:</p>
<blockquote>
<p>Schau dir mal an, wie die <code>std::map</code> aufgebaut ist.</p>
</blockquote>
<p>ja kenne ich. statt [&quot;a&quot;]=2.3 möchte ich aber foo(&quot;a&quot;)=2.3</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257091</guid><dc:creator><![CDATA[offensiv]]></dc:creator><pubDate>Thu, 04 Oct 2012 16:41:36 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 17:02:24 GMT]]></title><description><![CDATA[<p>offensiv schrieb:</p>
<blockquote>
<p>ja kenne ich. statt [&quot;a&quot;]=2.3 möchte ich aber foo(&quot;a&quot;)=2.3</p>
</blockquote>
<p>Ändert ja nichts am grundlegenden Prinzip. Beides sind Memberfunktionen.</p>
<p>&lt;<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    />&gt;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257105</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257105</guid><dc:creator><![CDATA[glühbirne]]></dc:creator><pubDate>Thu, 04 Oct 2012 17:02:24 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 17:27:47 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">template&lt;typename T1, typename T2&gt; class cVar
{
    private:
        static const int ARR_MAX=99;
        T1 _v1[ARR_MAX];
        T2 _v2[ARR_MAX];
        int _index;

    public:
        cVar() : _index(0)
        {
        }

        void add(T1 v1,T2 v2)
        {
            if (_index&gt;=ARR_MAX) throw logic_error(&quot;array zu klein.&quot;);
            _v1[_index] = v1;
            _v2[_index] = v2;
            _index++;
        }

		T2 get(T1 v1)
        {
            for (int i=0;i&lt;_index;i++)
                if ( _v1[i]==v1 ) return _v2[i];
            throw logic_error(&quot;'&quot; +v1+ &quot;' nicht gefunden.&quot;);
        }

        T2&amp; set(T1 v1)
        {
            for (int i=0;i&lt;_index;i++)
                if ( _v1[i]==v1 ) return _v2[i];
            throw logic_error(&quot;'&quot; +v1+ &quot;' nicht gefunden.&quot;);
        }
};

int main()
{
    cVar&lt;string,double&gt; nvars;
    nvars.add(&quot;b&quot;,1.2);
	nvars.set(&quot;b&quot;)=2.3;
	cout &lt;&lt; endl &lt;&lt; nvars.get(&quot;b&quot;);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2257116</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257116</guid><dc:creator><![CDATA[out]]></dc:creator><pubDate>Thu, 04 Oct 2012 17:27:47 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 17:35:06 GMT]]></title><description><![CDATA[<p>offensiv schrieb:</p>
<blockquote>
<p>compiliert er zwar, aber ich möchte ja die 2.3 meinem array von T2 zuweisen</p>
</blockquote>
<p>tu ich doch. Am Ende steht an der Position für die _v1[i]==&quot;a&quot; gilt, dass _v2[i]=2.3</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257120</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257120</guid><dc:creator><![CDATA[otze_logout]]></dc:creator><pubDate>Thu, 04 Oct 2012 17:35:06 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 17:36:56 GMT]]></title><description><![CDATA[<p>otze_logout schrieb:</p>
<blockquote>
<p>offensiv schrieb:</p>
<blockquote>
<p>compiliert er zwar, aber ich möchte ja die 2.3 meinem array von T2 zuweisen</p>
</blockquote>
<p>tu ich doch. Am Ende steht an der Position für die _v1[i]==&quot;a&quot; gilt, dass _v2[i]=2.3</p>
</blockquote>
<p>Er ist verwirrt, weil da get und nicht set steht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257122</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257122</guid><dc:creator><![CDATA[out]]></dc:creator><pubDate>Thu, 04 Oct 2012 17:36:56 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 17:54:36 GMT]]></title><description><![CDATA[<p>out schrieb:</p>
<blockquote>
<pre><code class="language-cpp">template&lt;typename T1, typename T2&gt; class cVar
{
    private:
        static const int ARR_MAX=99;
        T1 _v1[ARR_MAX];
        T2 _v2[ARR_MAX];
        int _index;

    public:
        cVar() : _index(0)
        {
        }

        void add(T1 v1,T2 v2)
        {
            if (_index&gt;=ARR_MAX) throw logic_error(&quot;array zu klein.&quot;);
            _v1[_index] = v1;
            _v2[_index] = v2;
            _index++;
        }

		T2 get(T1 v1)
        {
            for (int i=0;i&lt;_index;i++)
                if ( _v1[i]==v1 ) return _v2[i];
            throw logic_error(&quot;'&quot; +v1+ &quot;' nicht gefunden.&quot;);
        }

        T2&amp; set(T1 v1)
        {
            for (int i=0;i&lt;_index;i++)
                if ( _v1[i]==v1 ) return _v2[i];
            throw logic_error(&quot;'&quot; +v1+ &quot;' nicht gefunden.&quot;);
        }
};

int main()
{
    cVar&lt;string,double&gt; nvars;
    nvars.add(&quot;b&quot;,1.2);
	nvars.set(&quot;b&quot;)=2.3;
	cout &lt;&lt; endl &lt;&lt; nvars.get(&quot;b&quot;);
}
</code></pre>
</blockquote>
<p>ja so gehts. Ist mir blos noch nicht klar wieso <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257131</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257131</guid><dc:creator><![CDATA[offensiv]]></dc:creator><pubDate>Thu, 04 Oct 2012 17:54:36 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 18:09:10 GMT]]></title><description><![CDATA[<p>Was verstehst du dennnicht genau?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257139</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257139</guid><dc:creator><![CDATA[out]]></dc:creator><pubDate>Thu, 04 Oct 2012 18:09:10 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 18:29:24 GMT]]></title><description><![CDATA[<p>out schrieb:</p>
<blockquote>
<p>Was verstehst du dennnicht genau?</p>
</blockquote>
<p>Ja, habs mir nochmal durch den Kopf gehen lassen. Mir war nicht klar,<br />
das ich einem Referenz-Return-Value aus einer Funktion wieder direkt etwas<br />
zuweisen kann.</p>
<p>Habs halt sonst immer Klassisch</p>
<p>ref a=foo()<br />
a=1.2</p>
<p>gemacht.</p>
<p>Das Problem was ich nun erkenne ist, das ich die Variable aus der Hand gebe.<br />
Kann so zB keine Bereichsgrenzen meiner Variablen &quot;b&quot; überprüfen.</p>
<p>Hat jemand noch nen anderen Ansatz ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257140</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257140</guid><dc:creator><![CDATA[offensiv]]></dc:creator><pubDate>Thu, 04 Oct 2012 18:29:24 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 18:38:08 GMT]]></title><description><![CDATA[<p>offensiv schrieb:</p>
<blockquote>
<p>Das Problem was ich nun erkenne ist, das ich die Variable aus der Hand gebe.<br />
Kann so zB keine Bereichsgrenzen meiner Variablen &quot;b&quot; überprüfen.</p>
</blockquote>
<p>Ja, nimm normale Set-Memberfunktionen. Sonst frickelst du dir eine mühsame Lösung zusammen, nur um schöne Syntax zu haben.</p>
<p>Sowas wie nvars.set(&quot;b&quot;)=2.3 ist ohnehin sehr ungewöhnlich. Falls jemand anders (oder du selbst nach einiger Zeit) diesen Code sieht, ist Verwirrung garantiert.</p>
<p>&lt; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /> &gt;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257141</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257141</guid><dc:creator><![CDATA[glühbirne]]></dc:creator><pubDate>Thu, 04 Oct 2012 18:38:08 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 18:42:29 GMT]]></title><description><![CDATA[<p>glühbirne schrieb:</p>
<blockquote>
<p>offensiv schrieb:</p>
<blockquote>
<p>Das Problem was ich nun erkenne ist, das ich die Variable aus der Hand gebe.<br />
Kann so zB keine Bereichsgrenzen meiner Variablen &quot;b&quot; überprüfen.</p>
</blockquote>
<p>Ja, nimm normale Set-Memberfunktionen. Sonst frickelst du dir eine mühsame Lösung zusammen, nur um schöne Syntax zu haben.</p>
<p>Sowas wie nvars.set(&quot;b&quot;)=2.3 ist ohnehin sehr ungewöhnlich. Falls jemand anders (oder du selbst nach einiger Zeit) diesen Code sieht, ist Verwirrung garantiert.</p>
<p>&lt; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /> &gt;</p>
</blockquote>
<p>yes sir! Werde ich so machen. Aber mein Interpreter wird dieses Konstrukt übersetzen <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>Vielen Dank an Alle für die Denkansätze.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2257143</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257143</guid><dc:creator><![CDATA[offensiv]]></dc:creator><pubDate>Thu, 04 Oct 2012 18:42:29 GMT</pubDate></item><item><title><![CDATA[Reply to L-Value &#x2F; R-Value on Thu, 04 Oct 2012 20:14:57 GMT]]></title><description><![CDATA[<p>offensiv schrieb:</p>
<blockquote>
<p>Kann so zB keine Bereichsgrenzen meiner Variablen &quot;b&quot; überprüfen.</p>
</blockquote>
<p>Bau dir einen Wrapper (als Klasse), der die Bereichsgrenzen prueft..</p>
<p><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/2257173</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2257173</guid><dc:creator><![CDATA[new fricky]]></dc:creator><pubDate>Thu, 04 Oct 2012 20:14:57 GMT</pubDate></item></channel></rss>