Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

N'abend,

ich komm gerad überhaupt nicht weiter und verstehe nicht warum mein kompeiler das nich will...

folgendes Problem:

Ich erstelle ein DateTime Objekt :

DateTime datum= DateTime(k[loop]->jahr,k[loop]->mon, k[loop]->tag);

k gehört zu folgender Klasse:

ref class kontakt

{

public:

String^ Name;

String^ Nachname;

Int32^ tag;

Int32^ mon;

Int32^ jahr;

Int32^ anzahl;

String^ geschenk;

};

dazu gibt mir der kompeiler(C++ VS 2008) folgenden fehler:

"System::DateTime::DateTime": Durch keine der 14 Überladungen konnten alle Argumenttypen konvertiert werden.

kann 'System::DateTime::DateTime(__int64,System::DateTimeKind,bool)' sein

oder "System::DateTime::DateTime(int,int,int)"

bei Anpassung der Argumentliste '(System::Int32 ^, System::Int32 ^, System::Int32 ^)'

so nun hab ich mir die funktion DateTime() noch mal angeguckt und finde dazu im Objektbrowser:

System.DateTime.DateTime(System.Int32, System.Int32, System.Int32)

und verstehe nicht wo das problem jetzt liegt...

wär nett wenn mir jemand weiterhelfen kann

lg valentin

Bearbeitet von <<valle>>

Also ich hab ja keine Ahnung von C++/CLI, aber ich glaube die Instanzierung muss eher so aussehen:

DateTime datum= [COLOR="Red"]gcnew[/COLOR] DateTime(k[loop]->jahr,k[loop]->mon, k[loop]->tag);

Hab den Fehler gefunden...

Die Klasse muss so aussehen:

ref class kontakt

{

public:

String^ Name;

String^ Nachname;

Int32 tag;

Int32 mon;

Int32 jahr;

Int32 anzahl;

String^ geschenk;

};

dann gehts oder wenn man:

DateTime datum= DateTime(Convert::ToInt32(k[loop]->jahr),Convert::ToInt32(k[loop]->mon),Convert::ToInt32( k[loop]->tag));

es besteht also nen unterschied zwischen

Int32^x

und

Int32 x

lg valentin

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.