Új hozzászólás Aktív témák

  • PazsitZ

    addikt

    válasz mobal #2441 üzenetére


    void csak szam es szokoz karakter van-e a fileban()
    {
    char kar;
    int err;
    err=0;
    while (!feof(be))
    {
    fscanf(filebe, ''%c\n'', &kar);
    if (kar!=32||58<kar||kar<47) err=1;
    }
    return err;


    kéne egy olyan ami megnézi, hogy sikerült e megnyitni egy filet:
    [link]
    FOPEN - open a file for I/O.
    Several additional options can be specified by adding one or more letters to the possibilities listed above.
    All of the following options are unique to the GCOS-8 version of C and will not be portable to other implementations.

    d
    tells ''fopen'' to abort the program (die) with an error message if an error occurs in the open operation or
    in I/O performed later on the opened file.
    e
    displays an error message (on ''stderr'') if an error occurs in the open operation or in any I/O performed
    later on the opened file. In this case, the program is not aborted; the I/O function that finds the error
    will return the normal error status (if any) once the message has been printed.

    Az mit takar, hogy ''mátrixok kellenének''? :F Simán írj fel egyet és lesz.

    [Szerkesztve]

Új hozzászólás Aktív témák

Hirdetés