Search:

Type: Posts; User: TKMan

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,455

    I meant fgets, sorry. My plan is this: I got a...

    I meant fgets, sorry. My plan is this: I got a lot of files in a directory and some of the file names have mistakes(like a character should be lower case). I want the program to show me the name of...
  2. Replies
    2
    Views
    1,455

    Opening all files in a directory

    Hi,
    I want to write a programm that does this:
    1.Find the first file in the directory
    2.print its name into a input field
    3.rename the file

    Then the same procedure happens with the second...
  3. Replies
    41
    Views
    36,314

    Ok, thanks now I understood it.

    Ok, thanks now I understood it.
  4. Replies
    41
    Views
    36,314

    But if I use scanf it can always happen that...

    But if I use scanf it can always happen that there will be chars left in stdin. Can could I prevent this with scanf or do I have to use another function?
  5. Replies
    41
    Views
    36,314

    how would you flush stdin?

    how would you flush stdin?
  6. Replies
    41
    Views
    36,314

    while ((ch = getchar()) != '\n' && ch != EOF); ...

    while ((ch = getchar()) != '\n' && ch != EOF);

    I took this loop from the faq on this forum, so I guess itīs correct... So do you know a function that inserts chars into stdin?
  7. Replies
    41
    Views
    36,314

    void flush_stdin(void) { char ch = 0; while...

    void flush_stdin(void)
    {
    char ch = 0;

    while ((ch = getchar()) != '\n' && ch != EOF);
    }

    This code would always work if you could insert a char into stdin before the loop. Is this possible...
Results 1 to 7 of 7