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.

Error C2064: Ausdruck ergibt keine Funktion, die x Argumente übernimmt

Empfohlene Antworten

Veröffentlicht

Hallo an alle,

ich habe jetzt einen zweiten XMLContentHandler:SAXContentHandlerImpl im Programm. Mit nur einem ist alles prima.

Hier passiert der Fehler. CreateInstance() erwartet keine Argumente.


XMLContentHandler2 *pXMLContent=XMLContentHandler2::CreateInstance();

Das Verrückte dabei ist, wenn ich die beiden Include-Zeilen der XMLContentHandler vertausche, ist jeweils der zuletzt genannte nicht bekannt.

Ich habe mich an die Implementierungsvorgaben gehalten. Beide XMLContentHandler sind von SaxContentHandlerImpl abgeleitet.

Muss ich beim zweiten etwas weglassen, damit es geht?

  • Autor

Das war das Problem:


#if !defined(AFX_XMLCONTENTHANDLER_H__E0CFBC18_CCC1_42F3_B0A4_B03331AB9693__INCLUDED_)

 #define AFX_XMLCONTENTHANDLER_H__E0CFBC18_CCC1_42F3_B0A4_B03331AB9693__INCLUDED_

#endif //#if !defined(AFX_XMLCONTENTHANDLER_H__E0CFBC18_CCC1_42F3_B0A4_B03331AB9693__INCLUDED_)

Das darf nur einmal vorkommen, stand aber in jeder XMLContentHandler.h-Datei. Ich habe das jetzt in die SAXContentHandlerImpl.h-Datei gechrieben. Die wird ja in jeder XMLContentHandler.h-Datei includiert.

Das ist ein Include-Guard. Er verhindert, dass dieselbe Headerdatei mehr als einmal in eine .cpp-Datei eingebunden wird.

So etwas gehört in jede Headerdatei (wenn du es also aus einer Headerdatei entfernt hast, war das ein Fehler), allerdings muss das benutzte Präprozessorsymbol in jeder Datei anders sein.

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.