Ofstream - Kleines Prob!?



  • hm jo ich habs getestet, aber dann geht irgendwie garnichts mehr?

    edit etz gehts ^^

    hab ma den CODEBLOCKS IDE verwendet .. arbeite normal mit dev c++! Soll ich bei codeblocks bleiben?



  • Andere Frage!

    Ich hab ja ne Ifabfarge nach z.B. dem Wort HUND .. wenn in der datei hundeundkatzen.dat das wort HUND vorkommt woll es durch KATZE ersetzt werden! wie geht das?

    Einlesen von hundeundkatzen.dat
    hunde durch katzen im text ersetzen!

    Ausgeben von hundeundkatzen2.dat
    all right :)!



  • Mein Code:

    #include <cstdlib>
    #include <iostream>
    #include <fstream>
    #include <string>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    
    {
    
    char fileName[80];
    
    char buffer[255];
    
    char newFileName[80];
    
    cout << "Dateiname: "; // Eingabe Welche Datei gelesen werden soll
    
    cin >> fileName; // Variable für den Dateiname
    
    cout << "Neuer Dateiname: ";
    
    cin >> newFileName;
    
    ifstream fin(fileName); ofstream fout(newFileName);
    
    string zeile;
    
    while(getline(fin, zeile)) //zeilenweise einlesen
    
    {
    
    int sp_pos=zeile.find(' ');
    
    string nummer=zeile.substr(0,sp_pos);//erster Abschnitt
    
    zeile.erase(3,sp_pos+1);              //Restzeile
    
    if(zeile.find("Hallo du!",0)!=string::npos)
    
    {
    
      fout << "hello you!\n";
    
    }
    
    else if(zeile.find("Hallo",0)!=string::npos)
    
    {
    
      fout << "hello" << endl;
    
    }
    
    else if(zeile.find("(compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)",0)!=string::npos)
    
    {
    
        fout << "Wish This Were FireFox";
    
    }
    
    }
        system("PAUSE");
        return EXIT_SUCCESS;
    }
    

    Gestern hat er noch wörter usw. ersetzt aber als ich dann irgendwie ich glaube es war bei der 3 IF abfrage .. als die diese einfügte ging irgendwie nix mehr die ausgegebene Datei is ständig leer :/!

    und eig. sollen alle daten in die ausgegebene datei übernommen. Nur halt auch ausgetauscht oO



  • Eventuell solltest du hinter dem letzten if()-Block noch ein "else fout<<zeile<<endl;" anhängen, damit er nicht erkannte Zeilen unverändert übernimmt.



  • ui danke :)! etz is da irgendwie nur nen prob! :| die ausgabe sieht jetzt so aus:

    12渱搀漀眀猀㬀 唀㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 攀渀ⴀ唀匀㬀 爀瘀㨀㄀⸀㜀⸀㔀⤀ 䜀攀挀欀漀⼀㈀  㐀㄀㄀ 㜀 䘀椀爀攀昀漀砀⼀㄀⸀ ∀ഀഀ
    228mpatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    ਍㈀㠀㠀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 匀嘀㄀㬀 䤀 圀椀猀栀 吀栀椀猀 圀攀爀攀 䘀椀爀攀昀漀砀⸀㬀 ⸀一䔀吀 䌀䰀刀 ㄀⸀㄀⸀㐀㌀㈀㈀⤀∀ഀഀ
    355mpatible; MSIE 6.0; Windows NT 5.0)"
    ਍㄀㤀 洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 匀嘀㄀⤀∀ഀഀ
    135mpatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    ਍㐀㤀 洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀⤀∀ഀഀ
    150mpatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    ਍㈀㌀㔀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 ⸀一䔀吀 䌀䰀刀 ㄀⸀㄀⸀㐀㌀㈀㈀⤀∀ഀഀ
    220mpatible; MSIE 6.0; Windows NT 5.1; SV1)"
    ਍㈀㈀㜀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 匀嘀㄀㬀 䤀 圀椀猀栀 吀栀椀猀 圀攀爀攀 䘀椀爀攀昀漀砀⸀㬀 ⸀一䔀吀 䌀䰀刀 ㄀⸀㄀⸀㐀㌀㈀㈀⤀∀ഀഀ
    465mpatible; MSIE 6.0; Windows NT 5.1)"
    ਍㌀㠀㤀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 匀嘀㄀⤀∀ഀഀ
    277mpatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    ਍㐀㈀㄀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀ 㬀 ⸀一䔀吀 䌀䰀刀 ㄀⸀㄀⸀㐀㌀㈀㈀⤀∀ഀഀ
    492mpatible; MSIE 6.0; Windows NT 5.1; SV1)"
    ਍㌀㈀㄀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 ⸀一䔀吀 䌀䰀刀 ㄀⸀㄀⸀㐀㌀㈀㈀⤀∀ഀഀ
    510mpatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
    ਍㈀㤀㈀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 匀嘀㄀㬀 䤀 圀椀猀栀 吀栀椀猀 圀攀爀攀 䘀椀爀攀昀漀砀⸀㬀 ⸀一䔀吀 䌀䰀刀 ㄀⸀㄀⸀㐀㌀㈀㈀⤀∀ഀഀ
    269mpatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    ਍㐀㠀㄀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀⤀∀ഀഀ
    172mpatible; MSIE 6.0; Windows NT 5.1; SV1)"
    ਍㈀㔀㜀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 匀嘀㄀㬀 䤀 圀椀猀栀 吀栀椀猀 圀攀爀攀 䘀椀爀攀昀漀砀⸀㬀 ⸀一䔀吀 䌀䰀刀 ㄀⸀㄀⸀㐀㌀㈀㈀⤀∀ഀഀ
    548mpatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
    ਍㄀㐀㐀洀瀀愀琀椀戀氀攀㬀 䴀匀䤀䔀 㘀⸀ 㬀 圀椀渀搀漀眀猀 一吀 㔀⸀㄀㬀 匀嘀㄀⤀∀ഀഀ
    

    nur das die ganzen zahlen usw. chinesishe zeichen bzw. so kontainer ergeben



  • #include <cstdlib>
    #include <iostream>
    #include <fstream>
    #include <string>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    
    {
    
    char fileName[80];
    
    char buffer[255];
    
    char newFileName[80];
    
    cout << "Dateiname: "; // Eingabe Welche Datei gelesen werden soll
    
    cin >> fileName; // Variable für den Dateiname
    
    cout << "Neuer Dateiname: ";
    
    cin >> newFileName;
    
    ifstream fin(fileName); ofstream fout(newFileName);
    
    string zeile;
    
    while(getline(fin, zeile)) //zeilenweise einlesen
    
    {
    
    int sp_pos=zeile.find(' ');
    
    string nummer=zeile.substr(0,sp_pos); //erster Abschnitt
    
    zeile.erase(0,sp_pos++);              //Restzeile
    
    if(zeile.find("Hallo du!",0)!=string::npos)
    
    {
    
      fout << "hello you!\n";
    
    }
    
    else if(zeile.find("Hallo",0)!=string::npos)
    
    {
    
      fout << "hello\n" << endl;
    
    }
    
    else if(zeile.find("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)",0)!=string::npos)
    
    {
    
        fout << nummer << " " << zeile << endl;
    
    }
    
    else fout << zeile << endl;
    
    }
    
        system("PAUSE");
        return EXIT_SUCCESS;
    }
    

    brauch schon wieder hilfe :{

    Ich hab da jetzt nen prob... mal wieder -.-!

    Ich hab es bis vor kurzem hinbekommen die Datei halbwegs so auszuschreiben wies gewollt ist...

    NUMMER - NEUE ZEIELE
    NUMMER - ALTE ZEILE WENN KEINE ABFRAGE

    ... jetzt hab ich weiter probiert und nun gehts schon wieder nicht MAN! ich flipp aus :/!



  • keinen nen tipp? Was ich da falsch mache oda so 😞



  • Wenn du die Nummer haben willst, mußt du sie auch ausgeben 😉 (ein fout<<nummer<<" - "; vor dem Beginn der if()-Abfragen dürfte da reichen)



  • hae wie(so) vor der if abfrage 😕 😕



  • Wenn du es nach den if-Blöcken schreibst, landet die Zeilennummer an der falschen Stelle in der Ausgabedatei 😉

    alternativ kannst du auch die Ausgabe in jedem if-Block ergänzen:

    if(bed1)
      [b]fout<<nummer<<" - "[/b]<<ersatz1;
    else if(bed2)
      [b]fout<<nummer<<" - "[/b]<<ersatz2;
    else if...
      ...
    else
      [b]fout<<nummer<<" - "[/b]<<zeile;
    


  • so hab ich das doch :)!

    aber.. ich lesee DATEI1 ein ins programm

    'NUMMER' > 'BROWSERTYP BEZEICHNUNG'

    -------------------------

    dann werden die if fragen durchgeklappert ... normaler weiße müsse es so ausehen

    == 'NUMMER' > 'KURZE BROWSERBESCHREIBUNG' ==

    --- sieht aber so aus ---

    'BROWSERTYP' 'BEZEICHNUNG'

    😕 😕 😕 😕 😕

    EDIT;// Ich zeig nochma den Aktuellen Code:

    ( Die erste IF frage: Da hab ich was getestet klappt aber auch nicht.. und die 2te if abfrage ist so wie ichs von anfang an hatte)

    #include <cstdlib>
    #include <iostream>
    #include <fstream>
    #include <string>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    
    {
    
    char fileName[80];
    
    char buffer[255];
    
    char newFileName[80];
    
    cout << "Dateiname: "; // Eingabe Welche Datei gelesen werden soll
    
    cin >> fileName; // Variable für den Dateiname
    
    cout << "Neuer Dateiname: ";
    
    cin >> newFileName;
    
    ifstream fin(fileName); ofstream fout(newFileName);
    
    string zeile;
    
    while(getline(fin, zeile)) //zeilenweise einlesen
    
    {
    
    string::size_type sp_pos = zeile.find(' ');
    
    string nummer = zeile.substr(0,sp_pos); //erster Abschnitt
    
    zeile.erase(0,sp_pos++);              //Restzeile
    
    if(zeile.find("(compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)",0)!=string::npos)
    
    {
    
           string FireFox17("Fire Fox 1.0.7");
           zeile.replace(sp_pos,FireFox17.length(),FireFox17);                     
           fout << nummer << ' ' << zeile << endl;               
    
    }
    
    else if(zeile.find("Mozilla/4.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)",0)!=string::npos)
    
    {
           zeile = "hallo3";
           fout << nummer << ' ' << zeile << endl;
    
    }
    
    else fout << zeile << endl;
    
    }
    
        system("PAUSE");
        return EXIT_SUCCESS;
    }
    


  • Kann keiner helfen? Ich verzweifel echt 😞 !!



  • Ich frag nochma :/!

    Kann mir hier keiner sagen wie ich eine Textzeile in einer Text datei lesen und ersetzen kann

    z.B

    Der hund und die Katze!

    in

    Hund und Katze!



  • Da eine Textdatei variable Satzlängen (zu Deutsch "Textzeilen") enthält ist der einzig praktikable Weg das Schreiben einer neuen Textdatei mit den geänderten Zeilen...



  • na soweit sind wir doch schon längst

    les dir ma meinen code duch und schau was ich falsch mache! Eig. sollte es so gehen aber tuts irgendwie net



  • dogeye schrieb:

    aber.. ich lesee DATEI1 ein ins programm

    'NUMMER' > 'BROWSERTYP BEZEICHNUNG'

    dann werden die if fragen durchgeklappert ... normaler weiße müsse es so ausehen

    Direkt nach dem Auslesen dürfte beides zusammen in 'zeile' stehen - nach den Vorverarbeitungen (also am Beginn der if()-Kette) steht in 'nummer' die aktuelle Nummer und in 'zeile' der Teil 'BROWSERTYP BEZEICHNUNG'

    == 'NUMMER' > 'KURZE BROWSERBESCHREIBUNG' ==

    Das erreicht du mit dem "fout<<nummer<<' '<<...; innerhalb jedes if()-Abschnittes.

    'BROWSERTYP' 'BEZEICHNUNG'

    Erstens fehlt in der letzten Ausgabeanweisung (das unterste else) der Teil, der für die Nummern-Ausgabe zuständig ist. Und zweitens sehen deine Abfragen etwas zu spezifisch aus - wenn nur ein Zeichen nicht ganz stimmt, liefert die Bedingung false und du endest bei der Standard-Behandlung.

    PS: Übrigens sind großes 'H' und kleines 'h' zwei verschiedene Zeichen.



  • Ey sorry ich hab nen brett vorm kopf ich check ganix mehr wenn ich mir deine erleuterung so durch lese, lese ich das so als ob ich das schon habe im code? Oh man :/!



  • Ja, das habe ich aus deinem Code abgeleitet 😉

    Dein Problem teilt sich in zwei Teile auf:
    a) dem letzten else fehlt die Ausgabe der Zeilennummer:

    if()
      ...
    else
      fout<<nummer<<' '<<zeile;//Default-Verhalten - wenn kein if() zugeschlagen hat
    

    b) deine Vergleichsstrings sind möglicherweise zu spezifisch - da reicht schon ein Buchstabendreher oder ein vergessene Leerzeichen und find() findet den String nicht mehr wieder. (vielleicht wäre es angebracht, nach kürzeren Teilstücken zu suchen, notfalls mit && kombiniert)

    if(zeile.find("Hund")!=string::npos && zeile.find("Katze")!=string::npos)
      //die Worte "Hund" UND "Katze" kommen vor
      fout<<nummer<<' '<<"wie Hund und Katze\n";
    


  • hm jo das hab ich schon alles probiert :/!

    #include <cstdlib>
    #include <iostream>
    #include <fstream>
    #include <string>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    
    {
    
    char fileName[80];
    
    char buffer[255];
    
    char newFileName[80];
    
    cout << "Dateiname: "; // Eingabe Welche Datei gelesen werden soll
    
    cin >> fileName; // Variable für den Dateiname
    
    cout << "Neuer Dateiname: ";
    
    cin >> newFileName;
    
    ifstream fin(fileName); ofstream fout(newFileName);
    
    string zeile;
    
    while(getline(fin,zeile)) //zeilenweise einlesen
    
    {
    
    string::size_type sp_pos = zeile.find(' ');
    
    string nummer = zeile.substr(1,sp_pos); //erster Abschnitt
    
    zeile.erase(0,sp_pos+1);
    
    if(sp_pos == ("1.0.3705)",0)!=string::npos)
    
    {
                 zeile = "FireFox 1.7";
                 fout << nummer << ' ' << zeile << endl;
    
    }
    
    else if(sp_pos == ("rv:1.7.5)",0)!=string::npos)
    
    {
                zeile = "hallo3";
                fout << nummer << ' ' << zeile << endl;
    
    }
    
    else        fout << nummer << ' ' << zeile << endl;
    
    }
    
        system("PAUSE");
        return EXIT_SUCCESS;
    }
    

    das ist ein teil der Text datei: Wär kewl wenn du mal mein Proggy testen würdest evlt. siehst dann das was ich meine 😞

    47	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    44	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AtHome033; SV1)"
    558	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    73	"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)"
    156	"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"
    54	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt)"
    45	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    53	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    163	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    120	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
    358	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    48	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    122	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{1AA6D75B-C13D-4056-C786-F394AF0C16C9}; ESB{17004370-938E-48BE-B146-8CAB5CC28F47}; SV1; .NET CLR 1.0.3705)"
    51	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    72	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    46	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
    123	"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; ZON)"
    90	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    94	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    76	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    430	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    93	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    236	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    50	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    71	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    49	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    117	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    100	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    97	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    333	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    401	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    127	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    104	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    52	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    113	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    512	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    487	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1)"
    203	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    301	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    594	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    544	"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"
    403	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    509	"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.12) Gecko/20050919 Firefox/1.0.7"
    533	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    68	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    464	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    501	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    89	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Administrator; .NET CLR 1.1.4322)"
    456	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    110	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    107	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    101	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    591	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    70	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    563	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    98	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    109	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    112	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    485	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    69	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    468	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    111	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    106	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    405	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    99	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    102	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    373	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    280	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    86	"Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)"
    162	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    84	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    201	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    331	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)"
    85	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    95	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    75	"Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.11) Gecko/20050728"
    79	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    254	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
    417	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    105	"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.12) Gecko/20050919 Firefox/1.0.7"
    81	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    87	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    103	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Het Net 4.0; SV1; .NET CLR 1.0.3705)"
    118	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    82	"Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)"
    244	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    78	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705)"
    131	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    91	"Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)"
    212	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    339	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705)"
    96	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    92	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    323	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    88	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    80	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    83	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    143	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    422	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    395	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    406	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    234	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    147	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5))"
    382	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    167	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    319	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
    215	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts-MyWay; .NET CLR 1.0.3705)"
    216	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    242	"Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC)"
    543	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    498	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    168	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    556	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    290	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    202	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    404	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    230	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
    393	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    265	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    211	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    595	"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
    268	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    387	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    291	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    383	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    312	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    267	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    266	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    293	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    388	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    392	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    262	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    332	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    253	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    180	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    259	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    289	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    217	"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; ZON)"
    121	"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0"
    228	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    288	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    355	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    190	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    135	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    490	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
    150	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    235	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
    220	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    227	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    465	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
    389	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    277	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    421	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)"
    492	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    321	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
    510	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
    292	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    269	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    481	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
    172	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    257	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    548	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
    144	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    137	"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
    250	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    351	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    249	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    296	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AtHome033)"
    270	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    132	"Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; nl-NL; rv:1.7.12) Gecko/20050919 Firefox/1.0.7"
    283	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    460	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    445	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    491	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1)"
    157	"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.12) Gecko/20050919 Firefox/1.0.7"
    138	"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"
    233	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    226	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    263	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    159	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    505	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    261	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    365	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    192	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    181	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705)"
    125	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    322	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    313	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; SV1)"
    199	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    386	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    204	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    198	"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)"
    119	"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/416.11 (KHTML, like Gecko) Safari/416.12"
    385	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    145	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    545	"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.10) Gecko/20050717 Firefox/1.0.6"
    186	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    384	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; I Wish This Were Firefox.; .NET CLR 1.1.4322)"
    153	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    140	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    225	"Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)"
    200	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
    191	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    148	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; provided by huisartsenposten; .NET CLR 1.1.4322)"
    161	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    173	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    170	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    381	"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11"
    166	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    


  • dogeye schrieb:

    if(sp_pos == ("1.0.3705)",0)!=string::npos)
    

    Wat'n das? Du fragst ab, ob sp_pos gleich Null ist und überprüfst das Ergebnis dieses Vergleichs (FALSE) mit string::npos.
    richtig sollte es wohl so heißen:

    if(zeile.find("1.0.3705)")!=string::npos)
    

Anmelden zum Antworten