<?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[Anstatt void]]></title><description><![CDATA[<p>Ich hab jetzt eine funktionierende Funktion, nur der Monatstageszähler und Monatsszähler funktioniert nicht mehr, wahrscheinlich wegen des void, damit kann man bei RETURN nichts zurückgeben, aber um zurückgeben zu können (es soll ja weitergezählt werden), benötigt man was anderes.</p>
<p>Was aber? Sagt mir das mal, denn ich möchte noch mehr in Funktionen auslagern.</p>
<pre><code>#include &lt;iostream&gt;
using namespace std;

int tz=1; //tageszähler
int mo=1; //Monatszähler
int gtz=0; //durchgehender Tageszähler
int kjz; // Kleiner Jahreszähler (innerhalb Tetraeteris)
int ajz; //absoluter Jahreszähler durchgehend
int tez; //Teraeteriszähler
int Schleifeninhalt(int, int);
void Print(int); // Printfunktion

int main () 

{
for (tez=1; tez&lt;8; tez=tez+1) //Tetraeteriszähler (Schaltjahresperioden)
	{
	for (int kjz=1; kjz&lt;5; kjz=kjz+1) //zählt die Jahre innerhalb des Tetraeteris
		{
			ajz=ajz+1; //zählt die Jahre durchgehend
			for(int mo=1; mo&lt;13; mo=mo+1) //Monatszählerschleife
				{
					if (mo==1||mo==3||mo==5||mo==7||mo==8||mo==10||mo==12) //Tageszählerschleife für 31 Tage MONATE
						{
							for(int tz=1; tz&lt;32; tz=tz+1)
								{
								gtz=gtz+1;
								int Tag=Tag+ 1;
								Print(gtz);
								}
								cout&lt;&lt;&quot;MonatSENDE  \n  \n&quot;;
						}
					else
						{
						if (mo==4||mo==6||mo==9||mo==11)
						{
							for(int tz=1; tz&lt;31; tz=tz+1)//Tageszählerschleife für 30 Tage MONATE
								{
								gtz=gtz+1;
								int Tag=Tag+1;
								Print(gtz);
								}
							cout&lt;&lt;&quot;Monatsende  \n  \n&quot;;
						}	
					if (mo==2&amp;&amp;kjz==4)
						{
							for(int tz=1; tz&lt;30; tz=tz+1)//Tageszählerschleife für 29 Tage Schaltjahr
								{
								gtz=gtz+1;
								int Tag=Tag+1;
								Print(gtz);
								}
							cout&lt;&lt;&quot;Februar  \n  \n&quot;;
						}
						else if (mo==2&amp;&amp;kjz&lt;4)
							{
							for(int tz=1; tz&lt;29; tz=tz+1)//Tageszählerschleife für 28 Tage NichtSchaltjahr
								{
								gtz=gtz+1;
								int Tag=Tag+1;
								Print (gtz);
								}
							cout&lt;&lt;&quot;Februar  \n  \n&quot;;
							}	
				}

			}
			cout&lt;&lt;&quot;JAHRESENDE von JAHR &quot; &lt;&lt;ajz&lt;&lt; &quot;. Es ist das &quot;&lt;&lt;kjz&lt;&lt; &quot;. Jahr innerhalb der Tetraeteris Nr: &quot; &lt;&lt;tez&lt;&lt;&quot; \n  \n&quot;;
	}
	}
}				

 void Print(int a) //Definition einer Funktion
    {
	   cout&lt;&lt;&quot;TN = &quot;&lt;&lt;gtz&lt;&lt;&quot; TT &quot;&lt;&lt;gtz%7&lt;&lt;&quot; WN &quot;&lt;&lt;1+(gtz/7)&lt;&lt;&quot; Tag &quot; &lt;&lt;tz&lt;&lt;&quot; Monat &quot;&lt;&lt;mo&lt;&lt; &quot; \n&quot;;
	   return();
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/261229/anstatt-void</link><generator>RSS for Node</generator><lastBuildDate>Sat, 29 Aug 2026 04:32:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/261229.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 Feb 2010 14:46:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Anstatt void on Mon, 15 Feb 2010 14:46:34 GMT]]></title><description><![CDATA[<p>Ich hab jetzt eine funktionierende Funktion, nur der Monatstageszähler und Monatsszähler funktioniert nicht mehr, wahrscheinlich wegen des void, damit kann man bei RETURN nichts zurückgeben, aber um zurückgeben zu können (es soll ja weitergezählt werden), benötigt man was anderes.</p>
<p>Was aber? Sagt mir das mal, denn ich möchte noch mehr in Funktionen auslagern.</p>
<pre><code>#include &lt;iostream&gt;
using namespace std;

int tz=1; //tageszähler
int mo=1; //Monatszähler
int gtz=0; //durchgehender Tageszähler
int kjz; // Kleiner Jahreszähler (innerhalb Tetraeteris)
int ajz; //absoluter Jahreszähler durchgehend
int tez; //Teraeteriszähler
int Schleifeninhalt(int, int);
void Print(int); // Printfunktion

int main () 

{
for (tez=1; tez&lt;8; tez=tez+1) //Tetraeteriszähler (Schaltjahresperioden)
	{
	for (int kjz=1; kjz&lt;5; kjz=kjz+1) //zählt die Jahre innerhalb des Tetraeteris
		{
			ajz=ajz+1; //zählt die Jahre durchgehend
			for(int mo=1; mo&lt;13; mo=mo+1) //Monatszählerschleife
				{
					if (mo==1||mo==3||mo==5||mo==7||mo==8||mo==10||mo==12) //Tageszählerschleife für 31 Tage MONATE
						{
							for(int tz=1; tz&lt;32; tz=tz+1)
								{
								gtz=gtz+1;
								int Tag=Tag+ 1;
								Print(gtz);
								}
								cout&lt;&lt;&quot;MonatSENDE  \n  \n&quot;;
						}
					else
						{
						if (mo==4||mo==6||mo==9||mo==11)
						{
							for(int tz=1; tz&lt;31; tz=tz+1)//Tageszählerschleife für 30 Tage MONATE
								{
								gtz=gtz+1;
								int Tag=Tag+1;
								Print(gtz);
								}
							cout&lt;&lt;&quot;Monatsende  \n  \n&quot;;
						}	
					if (mo==2&amp;&amp;kjz==4)
						{
							for(int tz=1; tz&lt;30; tz=tz+1)//Tageszählerschleife für 29 Tage Schaltjahr
								{
								gtz=gtz+1;
								int Tag=Tag+1;
								Print(gtz);
								}
							cout&lt;&lt;&quot;Februar  \n  \n&quot;;
						}
						else if (mo==2&amp;&amp;kjz&lt;4)
							{
							for(int tz=1; tz&lt;29; tz=tz+1)//Tageszählerschleife für 28 Tage NichtSchaltjahr
								{
								gtz=gtz+1;
								int Tag=Tag+1;
								Print (gtz);
								}
							cout&lt;&lt;&quot;Februar  \n  \n&quot;;
							}	
				}

			}
			cout&lt;&lt;&quot;JAHRESENDE von JAHR &quot; &lt;&lt;ajz&lt;&lt; &quot;. Es ist das &quot;&lt;&lt;kjz&lt;&lt; &quot;. Jahr innerhalb der Tetraeteris Nr: &quot; &lt;&lt;tez&lt;&lt;&quot; \n  \n&quot;;
	}
	}
}				

 void Print(int a) //Definition einer Funktion
    {
	   cout&lt;&lt;&quot;TN = &quot;&lt;&lt;gtz&lt;&lt;&quot; TT &quot;&lt;&lt;gtz%7&lt;&lt;&quot; WN &quot;&lt;&lt;1+(gtz/7)&lt;&lt;&quot; Tag &quot; &lt;&lt;tz&lt;&lt;&quot; Monat &quot;&lt;&lt;mo&lt;&lt; &quot; \n&quot;;
	   return();
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1855997</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1855997</guid><dc:creator><![CDATA[Bekell]]></dc:creator><pubDate>Mon, 15 Feb 2010 14:46:34 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Mon, 15 Feb 2010 14:51:01 GMT]]></title><description><![CDATA[<p>Ganz ehrlich: Du brauchst ein Buch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1856000</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1856000</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Mon, 15 Feb 2010 14:51:01 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Mon, 15 Feb 2010 14:54:36 GMT]]></title><description><![CDATA[<p>Ich hab void durch int ersetzt, aber das bringt auch nichts.....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1856002</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1856002</guid><dc:creator><![CDATA[Bekell]]></dc:creator><pubDate>Mon, 15 Feb 2010 14:54:36 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Mon, 15 Feb 2010 15:02:05 GMT]]></title><description><![CDATA[<p>Hat gerade ein neuer Kurs angefangen oder wo kommen auf einmal die ganzen Schaltjahr-Fragen her?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1856007</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1856007</guid><dc:creator><![CDATA[Fellhuhn]]></dc:creator><pubDate>Mon, 15 Feb 2010 15:02:05 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Mon, 15 Feb 2010 15:05:19 GMT]]></title><description><![CDATA[<p>Ist immer derselbe -.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1856011</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1856011</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Mon, 15 Feb 2010 15:05:19 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Mon, 15 Feb 2010 15:10:15 GMT]]></title><description><![CDATA[<p>Fellhuhn schrieb:</p>
<blockquote>
<p>Hat gerade ein neuer Kurs angefangen oder wo kommen auf einmal die ganzen Schaltjahr-Fragen her?</p>
</blockquote>
<p>Ich bin Hobbyschaltjahresforscher. Das ist unheimlich interessant, nun will ich ein Programm schreiben, das mir ausrechnet, wie die Schalttage alle heißen und wann sie sind, und wieviele es noch geben wird.... <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>
<p>Schön was kaputt gemacht, dafür funktioniert die Funktion:</p>
<p>So sieht mein Printing aus:</p>
<p>TN = 1 TT 1 WN 1 Tag 1 Monat 1<br />
TN = 2 TT 2 WN 1 Tag 1 Monat 1<br />
TN = 3 TT 3 WN 1 Tag 1 Monat 1<br />
TN = 4 TT 4 WN 1 Tag 1 Monat 1<br />
TN = 5 TT 5 WN 1 Tag 1 Monat 1<br />
TN = 6 TT 6 WN 1 Tag 1 Monat 1<br />
TN = 7 TT 0 WN 2 Tag 1 Monat 1<br />
TN = 8 TT 1 WN 2 Tag 1 Monat 1<br />
TN = 9 TT 2 WN 2 Tag 1 Monat 1<br />
TN = 10 TT 3 WN 2 Tag 1 Monat 1<br />
TN = 11 TT 4 WN 2 Tag 1 Monat 1<br />
TN = 12 TT 5 WN 2 Tag 1 Monat 1<br />
TN = 13 TT 6 WN 2 Tag 1 Monat 1<br />
TN = 14 TT 0 WN 3 Tag 1 Monat 1<br />
TN = 15 TT 1 WN 3 Tag 1 Monat 1<br />
TN = 16 TT 2 WN 3 Tag 1 Monat 1<br />
TN = 17 TT 3 WN 3 Tag 1 Monat 1<br />
TN = 18 TT 4 WN 3 Tag 1 Monat 1<br />
TN = 19 TT 5 WN 3 Tag 1 Monat 1<br />
TN = 20 TT 6 WN 3 Tag 1 Monat 1<br />
TN = 21 TT 0 WN 4 Tag 1 Monat 1<br />
TN = 22 TT 1 WN 4 Tag 1 Monat 1<br />
TN = 23 TT 2 WN 4 Tag 1 Monat 1<br />
TN = 24 TT 3 WN 4 Tag 1 Monat 1<br />
TN = 25 TT 4 WN 4 Tag 1 Monat 1<br />
TN = 26 TT 5 WN 4 Tag 1 Monat 1<br />
TN = 27 TT 6 WN 4 Tag 1 Monat 1<br />
TN = 28 TT 0 WN 5 Tag 1 Monat 1<br />
TN = 29 TT 1 WN 5 Tag 1 Monat 1<br />
TN = 30 TT 2 WN 5 Tag 1 Monat 1<br />
TN = 31 TT 3 WN 5 Tag 1 Monat 1<br />
MonatSENDE</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1856014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1856014</guid><dc:creator><![CDATA[Bekell]]></dc:creator><pubDate>Mon, 15 Feb 2010 15:10:15 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Mon, 15 Feb 2010 16:37:43 GMT]]></title><description><![CDATA[<p>Bekell schrieb:</p>
<blockquote>
<p>Ich bin Hobbyschaltjahresforscher...</p>
</blockquote>
<p>Was kein Argument für mangelnde Buchwahl ist (zumal es auch gute kostenlosw gibt wie &quot;Thinking in C++&quot;).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1856056</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1856056</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Mon, 15 Feb 2010 16:37:43 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Wed, 04 Aug 2010 22:25:31 GMT]]></title><description><![CDATA[<p>Bekell schrieb:</p>
<blockquote>
<p>Ich bin Hobbyschaltjahresforscher.</p>
</blockquote>
<p>Was soll denn das sein?</p>
<blockquote>
<p>Das ist unheimlich interessant, nun will ich ein Programm schreiben, das mir ausrechnet, wie die Schalttage alle heißen und wann sie sind, und wieviele es noch geben wird.... <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>
</blockquote>
<p>Die heißen alle „ante diem bis sextilis calendis martiis“<br />
und sind alle am 24. Februar,<br />
aber wieviele es noch geben wird, kann auch kein Programm berechnen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1936367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1936367</guid><dc:creator><![CDATA[computus]]></dc:creator><pubDate>Wed, 04 Aug 2010 22:25:31 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Thu, 05 Aug 2010 08:18:59 GMT]]></title><description><![CDATA[<p>computus schrieb:</p>
<blockquote>
<p>Die heißen alle „ante diem bis sextilis calendis martiis“<br />
und sind alle am 24. Februar,<br />
aber wieviele es noch geben wird, kann auch kein Programm berechnen.</p>
</blockquote>
<p>Naja, da geht schon was. Man rechnet aus, wann fast kein Erdöl mehr da sein wird. Dann bricht der 3. Weltkrieg aus und danach gibt es keine Schaltjahre mehr. Nur mal so als Idee.</p>
<p>mfg Martin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1936456</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1936456</guid><dc:creator><![CDATA[mgaeckler]]></dc:creator><pubDate>Thu, 05 Aug 2010 08:18:59 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Thu, 05 Aug 2010 08:51:07 GMT]]></title><description><![CDATA[<p>oder es gibt eine Kalenderreform<br />
<a href="http://de.wikipedia.org/wiki/Kalenderentw%C3%BCrfe" rel="nofollow">http://de.wikipedia.org/wiki/Kalenderentw%C3%BCrfe</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1936476</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1936476</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 05 Aug 2010 08:51:07 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Thu, 05 Aug 2010 13:59:30 GMT]]></title><description><![CDATA[<p>mgaeckler schrieb:</p>
<blockquote>
<p>Dann bricht der 3. Weltkrieg aus und danach gibt es keine Schaltjahre mehr.</p>
</blockquote>
<p>Doch, es gibt nur keinen mehr der schaltet <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /><br />
<a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/26836">@topic</a>:</p>
<ol>
<li>Du solltest dir WIRKLICH ein Buch besorgen</li>
<li>Du solltest deine Variablennamen nicht zu sehr abkürzen. Das kann keiner mehr lesen, versetz dich mal in die Lage von jemandem, der nicht genau weiß was da vor sich geht (z.B. du selbst in 4 Monaten)</li>
</ol>
]]></description><link>https://www.c-plusplus.net/forum/post/1936641</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1936641</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Thu, 05 Aug 2010 13:59:30 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Thu, 05 Aug 2010 14:25:13 GMT]]></title><description><![CDATA[<p>Es sind schon fast sechs Monate <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1936649</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1936649</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Thu, 05 Aug 2010 14:25:13 GMT</pubDate></item><item><title><![CDATA[Reply to Anstatt void on Thu, 05 Aug 2010 14:39:04 GMT]]></title><description><![CDATA[<p>Gewöhne dir am besten auch eine vernünftige Formatierung an. Entscheide dich z.B., wie du einrücken willst, wenn du einen Scope aufmachst (geschweifte Klammer). Wie deine Entscheidung ausfällt, ist eigentlich egal (es gibt verschiedene Varianten), hauptsache du bleibst konsequent. In deinem Code sind verschiedene Varianten gemixt, was die Lesbarkeit ziemlich runterdrückt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1936657</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1936657</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Thu, 05 Aug 2010 14:39:04 GMT</pubDate></item></channel></rss>