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

Bei mir funktioniert sowohl die MFC- als auch die C-Version.

Ich habe den Dateinamen geändert, es ist aber die japanische Variante.

#include <afx.h>
#include <stdio.h>

int main()
{
// MFC-Version
/*
CStdioFile file;
file.Open("c:\\test.htm", CFile::modeRead );
CString line, whole;
while(file.ReadString(line))
{
whole += line;
whole += "\r\n";
}
*/

// C-Version
FILE* fp = fopen("c:\\test.htm", "rt");
fseek(fp, 0, SEEK_END);
int size = ftell(fp);
fseek(fp, 0, SEEK_SET);

char* getfile = new char[size + 1];
int realSize = fread(getfile, sizeof(char), size, fp);
getfile[realSize] = 0;

fclose(fp);

CString whole(getfile);

delete [] getfile;

// das geht in beiden Fällen, a ist 74
int a = whole.Find("<h");
}[/code]

ob "<h" oder "<h1" ist eigentlich egal.

beides muss in der Datei zu finden sein.

Ich verstehe nun gar nix mehr. Bei mir funktioniert es wirklich nicht :(

Ich bekomme ständig -1 als Rückgabewert :confused: :confused:

Habe mir soeben -ich weiss schon gar incht mehr das wievielte mal- die Datei ausgeben lassen eine Zeile bevor die while-Schleife beginnt und es ist die selbe. Auch "<h1" ist zu finden!

ja, habe ich auch vor. Werde dann gleich berichten.

danke für eure Mühe :( :e@sy

Deins funktioniert - natürlich.

Den Fehler hab ich immernoch nicht. Brauche eine Pause. Es muss logischerweise an meinem Code liegen.

Ihr könnt euch sicher sein, dass ich mittlerweile keine Fingernägel mehr habe und schon an mir selber zweifel. :(

@Klotzkopp

naja, hoffe, dir hat das Handbuch gefallen :beagolisc

zum Beispiel? :confused:

ok *alles mach was man mir sagt*

@Klotzkopp

naja, hoffe, dir hat das Handbuch gefallen :beagolisc

So weit reichen meine Japanischkenntnisse dann doch nicht ;)

Du kannst mir, wenn du willst und unter den üblichen Voraussetzungen, auch das Projekt zuschicken. Wenn ich Zeit hab, kann ich ja mal reinschauen.

danke für dein Angebot, jedoch hab ich nun mit nem Kollegen nochmal darüber nachgeschaut. Wir haben ein neues Projekt erstellt und alles mit Copy eingefügt... jetzt funktioniert es :confused: - oder sagen wir es so, er gibt mir einen vernünftigen Wert zurück. ;)

Vielen Dank nochmals für eure Hilfe :e@sy

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.