<?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[Zeitfunktionen]]></title><description><![CDATA[<p>Ich schreibe gerade an einer Datumsklasse und möchte daher die Systemzeit abfragen.<br />
Laut <a href="http://www.cppreference.com" rel="nofollow">www.cppreference.com</a> müsste es doch eigentlich so gehen:</p>
<pre><code class="language-cpp">include &lt;ctime&gt;

using namespace std;

int main()
{
    tm* temp = localtime(time());

    //jetzt etwas mit der Struktur tm anfangen 
}
</code></pre>
<p>Aber der Compiler meldet folgenden Fehler:<br />
too few arguments in function time_t time(time_t*)</p>
<p>Gut, time() will also einen Parameter time_t* nur laut <a href="http://cppreference.de" rel="nofollow">cppreference.de</a> will es das nicht und wie komm ich sonst noch da dran? Brauch den ja eigentlich für localtime.</p>
<p>Hoffe ihr wisst da mehr.</p>
<p>Panke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/124986/zeitfunktionen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 04:29:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/124986.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 Nov 2005 14:02:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zeitfunktionen on Wed, 02 Nov 2005 14:02:40 GMT]]></title><description><![CDATA[<p>Ich schreibe gerade an einer Datumsklasse und möchte daher die Systemzeit abfragen.<br />
Laut <a href="http://www.cppreference.com" rel="nofollow">www.cppreference.com</a> müsste es doch eigentlich so gehen:</p>
<pre><code class="language-cpp">include &lt;ctime&gt;

using namespace std;

int main()
{
    tm* temp = localtime(time());

    //jetzt etwas mit der Struktur tm anfangen 
}
</code></pre>
<p>Aber der Compiler meldet folgenden Fehler:<br />
too few arguments in function time_t time(time_t*)</p>
<p>Gut, time() will also einen Parameter time_t* nur laut <a href="http://cppreference.de" rel="nofollow">cppreference.de</a> will es das nicht und wie komm ich sonst noch da dran? Brauch den ja eigentlich für localtime.</p>
<p>Hoffe ihr wisst da mehr.</p>
<p>Panke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/906460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/906460</guid><dc:creator><![CDATA[Panke]]></dc:creator><pubDate>Wed, 02 Nov 2005 14:02:40 GMT</pubDate></item><item><title><![CDATA[Reply to Zeitfunktionen on Wed, 02 Nov 2005 14:11:05 GMT]]></title><description><![CDATA[<p>Afair kann (und muß) man dort NULL angeben, wenn der Parameter nicht benötigt wird (die Funktion stammt noch aus C und hat deshalb keine Default-Parameter oder Überladungen).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/906466</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/906466</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 02 Nov 2005 14:11:05 GMT</pubDate></item><item><title><![CDATA[Reply to Zeitfunktionen on Wed, 02 Nov 2005 14:12:56 GMT]]></title><description><![CDATA[<p>CStoll schrieb:</p>
<blockquote>
<p>Afair kann (und muß) man dort NULL angeben, wenn der Parameter nicht benötigt wird (die Funktion stammt noch aus C und hat deshalb keine Default-Parameter oder Überladungen).</p>
</blockquote>
<p>Yup: time(0);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/906472</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/906472</guid><dc:creator><![CDATA[GPC]]></dc:creator><pubDate>Wed, 02 Nov 2005 14:12:56 GMT</pubDate></item><item><title><![CDATA[Reply to Zeitfunktionen on Wed, 02 Nov 2005 19:32:35 GMT]]></title><description><![CDATA[<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/906757</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/906757</guid><dc:creator><![CDATA[Panke]]></dc:creator><pubDate>Wed, 02 Nov 2005 19:32:35 GMT</pubDate></item></channel></rss>