<?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[Zeitstrucktur]]></title><description><![CDATA[<p>Guten Tag und frohe rest Ostern erstmal,</p>
<p>Kurze frage gibt es eine Funktion usw, wo man int mit einer Zeit vergleichen kann. bzw das Int die glütige strucktur einer zeit besitzt ?</p>
<p>grüße Michael</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/208910/zeitstrucktur</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 04:06:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/208910.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Mar 2008 13:26:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zeitstrucktur on Mon, 24 Mar 2008 13:26:03 GMT]]></title><description><![CDATA[<p>Guten Tag und frohe rest Ostern erstmal,</p>
<p>Kurze frage gibt es eine Funktion usw, wo man int mit einer Zeit vergleichen kann. bzw das Int die glütige strucktur einer zeit besitzt ?</p>
<p>grüße Michael</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1479570</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1479570</guid><dc:creator><![CDATA[.Brusko]]></dc:creator><pubDate>Mon, 24 Mar 2008 13:26:03 GMT</pubDate></item><item><title><![CDATA[Reply to Zeitstrucktur on Mon, 24 Mar 2008 14:00:26 GMT]]></title><description><![CDATA[<p>Nimm &lt;time.h&gt; resp. &lt;ctime&gt;</p>
<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;time.h&gt;
struct tm *tmnow;
void today(void) {
   time_t tnow;
   time(&amp;tnow);
   tmnow = localtime(&amp;tnow);
   printf(&quot;Heute ist der &quot;);
   printf(&quot;%d.%d.%d\n&quot;,
      tmnow-&gt;tm_mday, tmnow-&gt;tm_mon + 1, tmnow-&gt;tm_year + 1900);
}
int main() {
   int tag, monat, jahr;
   unsigned int i=0, tmp;
   printf(&quot;Bitte gib Deinen Geburtstag ein!\n&quot;);
   printf(&quot;Tag : &quot;);
   scanf(&quot;%d&quot;, &amp;tag);
   printf(&quot;Monat : &quot;);
   scanf(&quot;%d&quot;, &amp;monat);
   printf(&quot;Jahr (jjjj) : &quot;);
   scanf(&quot;%d&quot;, &amp;jahr);
   today();
   if(tmnow-&gt;tm_mon &lt; monat) {
      i = 1;
      tmp=tmnow-&gt;tm_mon+1-monat;
      monat=tmp+12;
   }
   else {
      tmp=tmnow-&gt;tm_mon+1-monat;
      monat=tmp;
   }
   if(monat == 12) {
      monat = 0;
      i = 0;
   }
   printf(&quot;Sie sind %d Jahre %d Monate %d Tage alt\n&quot;,
      tmnow-&gt;tm_year+1900-jahr-i,monat, tmnow-&gt;tm_mday-tag);
   return EXIT_SUCCESS;
}
</code></pre>
<p><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/1479593</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1479593</guid><dc:creator><![CDATA[egon2]]></dc:creator><pubDate>Mon, 24 Mar 2008 14:00:26 GMT</pubDate></item><item><title><![CDATA[Reply to Zeitstrucktur on Mon, 24 Mar 2008 14:19:10 GMT]]></title><description><![CDATA[<p>also eine int mit der zeit vergleichen das iss ja ok ich meine das der eingebene int wert in einer erlaubenzeit bewegt nicht das zum 19:59:69 erkannt wird. Ich hab es zwar schon auf einem weg gelöst würde es blos gerne noch vereinfachen.</p>
<pre><code class="language-cpp">bool eingabecheck( string eingabe )
	{
	 int anzahlOK = 0, stelleMAX = 50;
	 for (int i = 0; i &lt; 6; i++)
	    {
	     if (isdigit(eingabe[i])) 
	       {
		if (eingabe[i] &lt;= stelleMAX)
		  {
		   int ersteziffer = eingabe[0];
		   if ((i == 0)&amp;(ersteziffer &lt; 50)) {stelleMAX = 57;anzahlOK++;}
		   else if ((i == 0)&amp;&amp;(ersteziffer == 50)) {stelleMAX  = 51;                        anzahlOK++;}
		   else if ((i == 1)||(i == 3)) {stelleMAX = 53; anzahlOK++;}
		   else if ((i == 2)||(i == 4)) {stelleMAX = 57; anzahlOK++;}
		   else if (i == 5) {anzahlOK++;}
		  }
	       }
	    }
	 if (anzahlOK == 6) {return true;}
	 else {return false;}
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1479600</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1479600</guid><dc:creator><![CDATA[Brusko]]></dc:creator><pubDate>Mon, 24 Mar 2008 14:19:10 GMT</pubDate></item></channel></rss>