Zum Inhalt springen

silicon

Mitglieder
  • Gesamte Inhalte

    26
  • Benutzer seit

  • Letzter Besuch

Alle Inhalte von silicon

  1. Hallo, ich bin silicon, mein erstes post hier. seit tagen versuche ich über difftime die differenz von 2 zeiten auszuwerten, die als STRING schon vorhanden sind. (Über Sql_select etc. andere Geschichte). Ich versuche diese Strings im Format von z.B 02.09.2003 in das benötigte zeitformat für difftime umzuwandeln. das ganze spielt sich in folgender funktion ab (typ ist jetzt erstmal uninteressant) int validate_date (char *datum, int typ) { char *s; struct tm *sysdate,*carddate; int day; s = select_sysdate (30); /*funktioniert, kommt aus nem select woanders her* strptime( datum, "%m.%d.%Y", &carddate ); strptime( s, "%m.%d.%Y", &sysdate ); day = difftime( carddate, sysdate); return day; } Mag sein das int Day als Return nicht richtig ist, aber da kommt keine Fehlermeldung. validate.c: In function `validate_date': validate.c:213: warning: assignment from incompatible pointer type validate.c:214: warning: passing arg 3 of `strptime' from incompatible pointer type validate.c:216: warning: passing arg 3 of `strptime' from incompatible pointer type validate.c:218: warning: passing arg 1 of `difftime' makes integer from pointer without a cast validate.c:218: warning: passing arg 2 of `difftime' makes integer from pointer without a cast Ist meine bisherige Fehlermeldung. Sorry, ich spreche noramleweise nicht C und tu mir momentan etwas schwer... cheers, silicon

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...