<?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[Einteilung in Klassen]]></title><description><![CDATA[<p>Servus ich habe versucht folgendes Programm mit der C Unterprogrammtechnik in C++ mit Klassen etc umzu setzten.<br />
Jetzt bin ich mir aber nicht sicher ob as in der main so in ordnung ist oder ob ich da doppelt arbeite weil ich da ja nochmal variable deklariere um das Programm zum laufen zu bekommen.</p>
<pre><code>#include &lt;iostream.h&gt;

int cin_auswahl();
void cout_wert(int);

int cin_auswahl()
{
    int auswahl;
    do 
	{	
	    cout&lt;&lt;&quot;\n \t Z A H L E N K O N V E R T I E R U N G \n&quot;;                                                   
	    cout&lt;&lt;&quot;Bitte Waehlen Sie aus zwischen\n&quot;;                                        
	    cout&lt;&lt;&quot;1.Hexadezimal\n2.Octal\n3.Dezimal\n\n&quot;; 
	    cin &gt;&gt; auswahl; 	
		if((auswahl&lt;1)||(auswahl&gt;3))
		{
		    cout&lt;&lt; &quot;Wertenereich ungueltig&quot;;
			cout&lt;&lt; &quot;\nErneute Eingabe taetigen&quot;;
		}
	}while((auswahl&lt;1)||(auswahl&gt;3)); 
	return(auswahl);
}

void cout_wert(int auswahl)
{
    int	wert;
	switch (auswahl) 
	{					
        case 1: 
               cout &lt;&lt;&quot;\nHexadezimal  =&quot;;
               cin &gt;&gt; hex &gt;&gt; wert;
	       cout &lt;&lt;&quot;Dezimal      =&quot;&lt;&lt; dec &lt;&lt;wert;
               cout &lt;&lt;&quot;\nOctal        =&quot;&lt;&lt; oct &lt;&lt;wert&lt;&lt;&quot;\n&quot;; 
			   break;

	    case 2: 
	           cout &lt;&lt;&quot;\nOctal       =&quot;;
	           cin &gt;&gt; oct &gt;&gt;wert; 
               cout&lt;&lt;&quot;Dezimal     =&quot;&lt;&lt; dec &lt;&lt;wert;
               cout&lt;&lt;&quot;\nHexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert&lt;&lt;&quot;\n&quot;; 
               break;

	    case 3: 
	           cout &lt;&lt; &quot;Dezimalzahl =&quot;;
	           cin &gt;&gt; dec &gt;&gt; wert; 
               cout&lt;&lt;&quot;Hexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert;
               cout&lt;&lt;&quot;\nOctal       =&quot;&lt;&lt; oct &lt;&lt;wert&lt;&lt;&quot;\n&quot;;  
               break;   
	} 		
}
int main()
{

    int auswahl; 
    auswahl=cin_auswahl();
    cout_wert(auswahl);

return 0;
}
</code></pre>
<p>mit klassen:</p>
<pre><code>#include &lt;iostream.h&gt;

class nummber
{
    public:
		   void init(int wert,int auswahl);
           int cin_auswahl(int);
           void cout_wert(int,int);

	private:
		   int wert1;
		   int auswahl1;
};

void nummber::init(int wert,int auswahl)
{
	wert1=wert;
	auswahl1=auswahl;
}

int nummber::cin_auswahl(int auswahl)
{
    do 
	{	
	    cout&lt;&lt;&quot;\n \t Z A H L E N K O N V E R T I E R U N G \n&quot;;                                                   
	    cout&lt;&lt;&quot;Bitte Waehlen Sie aus zwischen\n&quot;;                                        
	    cout&lt;&lt;&quot;1.Hexadezimal\n2.Octal\n3.Dezimal\n\n&quot;; 
	    cin &gt;&gt; auswahl; 

		if((auswahl&lt;1)||(auswahl&gt;3))
		{
		    cout&lt;&lt; &quot;Wertenereich ungueltig&quot;;
			cout&lt;&lt; &quot;\nErneute Eingabe taetigen&quot;;
		}

	}while((auswahl&lt;1)||(auswahl&gt;3)); 

	return(auswahl);
}

void nummber::cout_wert(int auswahl,int wert)
{
	switch (auswahl) 
	{					
        case 1: 
               cout &lt;&lt;&quot;\nHexadezimal  =&quot;;
               cin &gt;&gt; hex &gt;&gt; wert;
			   cout &lt;&lt;&quot;Dezimal      =&quot;&lt;&lt; dec &lt;&lt;wert;
               cout &lt;&lt;&quot;\nOctal        =&quot;&lt;&lt; oct &lt;&lt;wert&lt;&lt;&quot;\n&quot;; 
			   break;

	    case 2: 
	           cout &lt;&lt;&quot;\nOctal       =&quot;;
	           cin &gt;&gt; oct &gt;&gt;wert; 
               cout&lt;&lt;&quot;Dezimal     =&quot;&lt;&lt; dec &lt;&lt;wert;
               cout&lt;&lt;&quot;\nHexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert&lt;&lt;&quot;\n&quot;; 
               break;

	    case 3: 
	           cout &lt;&lt; &quot;Dezimalzahl =&quot;;
	           cin &gt;&gt; dec &gt;&gt; wert; 
               cout&lt;&lt;&quot;Hexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert;
               cout&lt;&lt;&quot;\nOctal       =&quot;&lt;&lt; oct &lt;&lt;wert&lt;&lt;&quot;\n&quot;;  
               break;   
	} 		
}

int main(void)
{
	int auswahl=0;
	int wert=0;
    nummber zk;            //Zahlenkonvertierungsinstanz
	zk.init(0,0);
	auswahl=zk.cin_auswahl(auswahl);  
    zk.cout_wert(auswahl,wert);

return 0;
}
</code></pre>
<p>schonmal danke für eure hilfe <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/182118/einteilung-in-klassen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 12:13:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/182118.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 May 2007 16:56:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 16:56:45 GMT]]></title><description><![CDATA[<p>Servus ich habe versucht folgendes Programm mit der C Unterprogrammtechnik in C++ mit Klassen etc umzu setzten.<br />
Jetzt bin ich mir aber nicht sicher ob as in der main so in ordnung ist oder ob ich da doppelt arbeite weil ich da ja nochmal variable deklariere um das Programm zum laufen zu bekommen.</p>
<pre><code>#include &lt;iostream.h&gt;

int cin_auswahl();
void cout_wert(int);

int cin_auswahl()
{
    int auswahl;
    do 
	{	
	    cout&lt;&lt;&quot;\n \t Z A H L E N K O N V E R T I E R U N G \n&quot;;                                                   
	    cout&lt;&lt;&quot;Bitte Waehlen Sie aus zwischen\n&quot;;                                        
	    cout&lt;&lt;&quot;1.Hexadezimal\n2.Octal\n3.Dezimal\n\n&quot;; 
	    cin &gt;&gt; auswahl; 	
		if((auswahl&lt;1)||(auswahl&gt;3))
		{
		    cout&lt;&lt; &quot;Wertenereich ungueltig&quot;;
			cout&lt;&lt; &quot;\nErneute Eingabe taetigen&quot;;
		}
	}while((auswahl&lt;1)||(auswahl&gt;3)); 
	return(auswahl);
}

void cout_wert(int auswahl)
{
    int	wert;
	switch (auswahl) 
	{					
        case 1: 
               cout &lt;&lt;&quot;\nHexadezimal  =&quot;;
               cin &gt;&gt; hex &gt;&gt; wert;
	       cout &lt;&lt;&quot;Dezimal      =&quot;&lt;&lt; dec &lt;&lt;wert;
               cout &lt;&lt;&quot;\nOctal        =&quot;&lt;&lt; oct &lt;&lt;wert&lt;&lt;&quot;\n&quot;; 
			   break;

	    case 2: 
	           cout &lt;&lt;&quot;\nOctal       =&quot;;
	           cin &gt;&gt; oct &gt;&gt;wert; 
               cout&lt;&lt;&quot;Dezimal     =&quot;&lt;&lt; dec &lt;&lt;wert;
               cout&lt;&lt;&quot;\nHexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert&lt;&lt;&quot;\n&quot;; 
               break;

	    case 3: 
	           cout &lt;&lt; &quot;Dezimalzahl =&quot;;
	           cin &gt;&gt; dec &gt;&gt; wert; 
               cout&lt;&lt;&quot;Hexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert;
               cout&lt;&lt;&quot;\nOctal       =&quot;&lt;&lt; oct &lt;&lt;wert&lt;&lt;&quot;\n&quot;;  
               break;   
	} 		
}
int main()
{

    int auswahl; 
    auswahl=cin_auswahl();
    cout_wert(auswahl);

return 0;
}
</code></pre>
<p>mit klassen:</p>
<pre><code>#include &lt;iostream.h&gt;

class nummber
{
    public:
		   void init(int wert,int auswahl);
           int cin_auswahl(int);
           void cout_wert(int,int);

	private:
		   int wert1;
		   int auswahl1;
};

void nummber::init(int wert,int auswahl)
{
	wert1=wert;
	auswahl1=auswahl;
}

int nummber::cin_auswahl(int auswahl)
{
    do 
	{	
	    cout&lt;&lt;&quot;\n \t Z A H L E N K O N V E R T I E R U N G \n&quot;;                                                   
	    cout&lt;&lt;&quot;Bitte Waehlen Sie aus zwischen\n&quot;;                                        
	    cout&lt;&lt;&quot;1.Hexadezimal\n2.Octal\n3.Dezimal\n\n&quot;; 
	    cin &gt;&gt; auswahl; 

		if((auswahl&lt;1)||(auswahl&gt;3))
		{
		    cout&lt;&lt; &quot;Wertenereich ungueltig&quot;;
			cout&lt;&lt; &quot;\nErneute Eingabe taetigen&quot;;
		}

	}while((auswahl&lt;1)||(auswahl&gt;3)); 

	return(auswahl);
}

void nummber::cout_wert(int auswahl,int wert)
{
	switch (auswahl) 
	{					
        case 1: 
               cout &lt;&lt;&quot;\nHexadezimal  =&quot;;
               cin &gt;&gt; hex &gt;&gt; wert;
			   cout &lt;&lt;&quot;Dezimal      =&quot;&lt;&lt; dec &lt;&lt;wert;
               cout &lt;&lt;&quot;\nOctal        =&quot;&lt;&lt; oct &lt;&lt;wert&lt;&lt;&quot;\n&quot;; 
			   break;

	    case 2: 
	           cout &lt;&lt;&quot;\nOctal       =&quot;;
	           cin &gt;&gt; oct &gt;&gt;wert; 
               cout&lt;&lt;&quot;Dezimal     =&quot;&lt;&lt; dec &lt;&lt;wert;
               cout&lt;&lt;&quot;\nHexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert&lt;&lt;&quot;\n&quot;; 
               break;

	    case 3: 
	           cout &lt;&lt; &quot;Dezimalzahl =&quot;;
	           cin &gt;&gt; dec &gt;&gt; wert; 
               cout&lt;&lt;&quot;Hexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert;
               cout&lt;&lt;&quot;\nOctal       =&quot;&lt;&lt; oct &lt;&lt;wert&lt;&lt;&quot;\n&quot;;  
               break;   
	} 		
}

int main(void)
{
	int auswahl=0;
	int wert=0;
    nummber zk;            //Zahlenkonvertierungsinstanz
	zk.init(0,0);
	auswahl=zk.cin_auswahl(auswahl);  
    zk.cout_wert(auswahl,wert);

return 0;
}
</code></pre>
<p>schonmal danke für eure hilfe <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/1289274</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289274</guid><dc:creator><![CDATA[Dragonslayer]]></dc:creator><pubDate>Mon, 21 May 2007 16:56:45 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 19:10:06 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#if !defined(NUMBER_H__INCLUDED) // - Include Guard
#define NUMBER_H__INCLUDED // - Include Guard

#if (_MSC_VER &gt; 1000)
	#pragma once // - Sowas ähnliches wie ein Include Guard ... Forumsuche
#endif // _MSC_VER &gt; 1000

#include &lt;iostream&gt; // iostream.h gibt es im Standard nicht!

class Number
{
private:
	enum Type
	{
		N_DEC = 0,
		N_OCT,
		N_HEX
	}	m_Type; // Unsere Zahlentypen ...
	unsigned int	m_nValue; // Die Zahl ...

public:
	Number(const Type type = N_DEC, const unsigned int value = 0) : m_Type(type), m_nValue(value) // Konstruktor mit default-value und Initialisierungsliste
	{}

public:
	void stream(std::ostream&amp; stream) const // Funktion die einen Ausgabestream haben will ... dann können wir unsere Zahl in entsprechender Form ausgeben ... const, da wir nichts an den Membervariablen ändern ...
	{
		stream &lt;&lt; (m_Type == N_DEC ? std::dec : (m_Type == N_OCT ? std::oct : std::hex)) &lt;&lt; m_nValue;
	}
};

#endif // NUMBER_H__INCLUDED // - Include Guard
</code></pre>
<p>... so wäre das eher zu machen ... also würde ich so machen <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><strong>Edit</strong><br />
So ... <a href="http://google.de" rel="nofollow">google.de</a> einfach mal nach den Sachen wie &quot;Include Guard&quot; und benutz die Forumsuche für &quot;Include Guard vs. #pragma once&quot; ...<br />
Wenn de sonnst was nicht verstehst ... guck dir ein Grundlagen-Tutorial an!<br />
Jetzt musst du übrigens noch die operator's wie +, -, == usw überladen, damit deine Klasse einen Sinn hat.</p>
<pre><code class="language-cpp">int main()
{
    Number num(N_HEX, 100);
    num.stream(std::cout);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1289357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289357</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Mon, 21 May 2007 19:10:06 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 18:58:40 GMT]]></title><description><![CDATA[<p>oO so viele Sachen die ich noch nie gesehen hab^^</p>
<p>könnte ich nicht einfach was an meiner main so ändern , das ich verhindere die beiden variablen nochmal neu zu deklarieren?</p>
<p>kommt schlecht wenn ich da sachen einbaue die ich noch net gehabt hab und netmal im ansatz verstehe....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1289371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289371</guid><dc:creator><![CDATA[Dragonslayer]]></dc:creator><pubDate>Mon, 21 May 2007 18:58:40 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 19:10:21 GMT]]></title><description><![CDATA[<p>Hab dir was dran geschrieben ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1289383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289383</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Mon, 21 May 2007 19:10:21 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 19:12:15 GMT]]></title><description><![CDATA[<p>(D)Evil schrieb:</p>
<blockquote>
<pre><code class="language-cpp">public:
	void stream(std::ostream&amp; stream) const
	{
		stream &lt;&lt; (m_Type == N_DEC ? std::dec : (m_Type == N_OCT ? std::oct : std::hex)) &lt;&lt; m_nValue;
	}
};
</code></pre>
</blockquote>
<p>Igit. Wenn du aus nem case so ein unübersichtliches if ... else if .... else machst, ist es bestimmt nicht besser. Stell dir mal vor, dass soll erweitert werden.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/12153">@Dragonslayer</a><br />
Ist dir der Sinn von Membervariablen bekannt? Wenn du auswahl1 einen Wert zuweist, dann hat sie diesen auch noch in der nächsten Methode, wenn es sich um die selbe instanz der Klasse handelt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1289385</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289385</guid><dc:creator><![CDATA[patternswärenzuviel]]></dc:creator><pubDate>Mon, 21 May 2007 19:12:15 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 19:15:51 GMT]]></title><description><![CDATA[<p><strong>patternswärenzuviel</strong><br />
Wollte ich die erweitern? Hab ich nicht gesagt. So ist es kürzer und ich versuchen meist eine rel. kurze Lösung zu finden ... gerade if else-kram kann man damit schön kürzen ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1289390</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289390</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Mon, 21 May 2007 19:15:51 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 19:17:08 GMT]]></title><description><![CDATA[<p>geht ja nit darum das ich zu faul bin mir das anzueigen, nur ich soll halt als testat das obrige programm in Klassen unterteilen, quasi nur die grundlagen mit methoden etc.</p>
<p>Das kann doch net so kompliziert sein^^</p>
<p>will nur wissen obs sich die deklaration von zusätzlichen variablen die ich hier mache vermeiden läst.</p>
<pre><code>int main(void)
{
    int auswahl=0;      // sinnvoll?
    int wert=0;         // sinnvoll?
    nummber zk;            //Zahlenkonvertierungsinstanz
    zk.init(0,0);
    auswahl=zk.cin_auswahl(auswahl);  
    zk.cout_wert(auswahl,wert);

return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1289392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289392</guid><dc:creator><![CDATA[Dragonslayer]]></dc:creator><pubDate>Mon, 21 May 2007 19:17:08 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 19:24:59 GMT]]></title><description><![CDATA[<p>(D)Evil schrieb:</p>
<blockquote>
<p>So ist es kürzer und ich versuchen meist eine rel. kurze Lösung zu finden ...</p>
</blockquote>
<p>Was nicht immer besser ist, wenns nur um die Codelänge geht.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/12153">@Dragonslayer</a><br />
So wie du das machst ist das nicht sinnvoll</p>
<pre><code class="language-cpp">void nummber::cin_auswahl()
{
    do
    {   
        cout&lt;&lt;&quot;\n \t Z A H L E N K O N V E R T I E R U N G \n&quot;;                                                  
        cout&lt;&lt;&quot;Bitte Waehlen Sie aus zwischen\n&quot;;                                        
        cout&lt;&lt;&quot;1.Hexadezimal\n2.Octal\n3.Dezimal\n\n&quot;;
        cin &gt;&gt; auswahl1; //in die Membervariable

...
void cout_wert()
{
    int    wert;
    switch (auswahl1) //wieder die Membervariable verwenden
    {                   
        case 1:
  ...
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1289398</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289398</guid><dc:creator><![CDATA[patternswärenzuviel]]></dc:creator><pubDate>Mon, 21 May 2007 19:24:59 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 19:56:58 GMT]]></title><description><![CDATA[<p>hm die member varaible public machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1289414</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289414</guid><dc:creator><![CDATA[Dragonslayer]]></dc:creator><pubDate>Mon, 21 May 2007 19:56:58 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Mon, 21 May 2007 22:53:41 GMT]]></title><description><![CDATA[<p>ALso selber nochmal nachgedacht und zu dem entschluss gekommen das die beiden methoden ja einfach beide gar keine werte haben müssen</p>
<pre><code>#include &lt;iostream.h&gt;

class nummber
{
    public:
		   void init(int wert,int auswahl);
           int cin_auswahl();
           void cout_wert();

	private:
		   int wert1;
		   int auswahl1;
};

void nummber::init(int wert,int auswahl)
{
	wert1=wert;
	auswahl1=auswahl;
}

int nummber::cin_auswahl()
{
    do 
	{	
	    cout&lt;&lt;&quot;\n \t Z A H L E N K O N V E R T I E R U N G \n&quot;;                                                   
	    cout&lt;&lt;&quot;Bitte Waehlen Sie aus zwischen\n&quot;;                                        
	    cout&lt;&lt;&quot;1.Hexadezimal\n2.Octal\n3.Dezimal\n\n&quot;; 
	    cin &gt;&gt; auswahl1; 

		if((auswahl1&lt;1)||(auswahl1&gt;3))
		{
		    cout&lt;&lt; &quot;Wertenereich ungueltig&quot;;
			cout&lt;&lt; &quot;\nErneute Eingabe taetigen&quot;;
		}

	}while((auswahl1&lt;1)||(auswahl1&gt;3)); 

	return(auswahl1);
}

void nummber::cout_wert()
{
	switch (auswahl1) 
	{					
        case 1: 
               cout &lt;&lt;&quot;\nHexadezimal  =&quot;;
               cin &gt;&gt; hex &gt;&gt; wert1;
			   cout &lt;&lt;&quot;Dezimal      =&quot;&lt;&lt; dec &lt;&lt;wert1;
               cout &lt;&lt;&quot;\nOctal        =&quot;&lt;&lt; oct &lt;&lt;wert1&lt;&lt;&quot;\n&quot;; 
			   break;

	    case 2: 
	           cout &lt;&lt;&quot;\nOctal       =&quot;;
	           cin &gt;&gt; oct &gt;&gt;wert1; 
               cout&lt;&lt;&quot;Dezimal     =&quot;&lt;&lt; dec &lt;&lt;wert1;
               cout&lt;&lt;&quot;\nHexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert1&lt;&lt;&quot;\n&quot;; 
               break;

	    case 3: 
	           cout &lt;&lt; &quot;Dezimalzahl =&quot;;
	           cin &gt;&gt; dec &gt;&gt; wert1; 
               cout&lt;&lt;&quot;Hexadezimal =&quot;&lt;&lt; hex &lt;&lt; wert1;
               cout&lt;&lt;&quot;\nOctal       =&quot;&lt;&lt; oct &lt;&lt;wert1&lt;&lt;&quot;\n&quot;;  
               break;   
	} 		
}
int main(void)
{
    nummber zk;            //Zahlenkonvertierungsinstanz
	zk.init(0,0);
	zk.cin_auswahl();  
    zk.cout_wert();

return 0;
}
</code></pre>
<p>versteh ich das richtig das man auf private elemente in methoden zugreifen kann, wenn man vorher mit einer init methode zuweist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1289495</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289495</guid><dc:creator><![CDATA[Dragonslayer_]]></dc:creator><pubDate>Mon, 21 May 2007 22:53:41 GMT</pubDate></item><item><title><![CDATA[Reply to Einteilung in Klassen on Tue, 22 May 2007 06:57:28 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>kleine Randbemerkung: &quot;Nummber&quot; ??<br />
Also ich würde mich für eine Sprache entscheiden. <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>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1289560</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289560</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Tue, 22 May 2007 06:57:28 GMT</pubDate></item></channel></rss>