(ANSI C) sscanf(...)??



  • habe folgendes problem:

    char tmpStr[250]; 
    
    [....]
    //In tmpStr steht nun z.B. "127.23.21.54:888"
    
    int ip_1;
    int ip_2;
    int ip_3
    int ip_4
    int port;
    sscanf(rtmpStr, "%i.%i.%i.%i:%i", &ip_1, &ip_2, &ip_3, &ip_4, &port);
    

    der inhalt von ip_1 bis ip_4 ist korrect nurin port steht eine scheinbar willkürliche Zahl!
    jemand ne idee?

    [ Dieser Beitrag wurde am 09.04.2003 um 17:44 Uhr von Monchi*96 editiert. ]



  • Keine WinAPI.

    Nicht mal TCHAR... 😉


Anmelden zum Antworten