Search:

Type: Posts; User: kodax

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    15
    Views
    2,156

    This is the correct way to do it.

    This is the correct way to do it.
  2. Replies
    15
    Views
    2,156

    /* main.m, Simple Calculator, Created by Great on...

    /* main.m, Simple Calculator, Created by Great on 10/30/22. */


    #import <Foundation/Foundation.h>


    int enter_value(int);
    int enter_operator(void);
    int calculate(int, int, char);
  3. Replies
    15
    Views
    2,156

    Cheap trick to force someone else to do your...

    Cheap trick to force someone else to do your stuff..



    in <= '9' && in >= '0'
    Remove this.
    Keep it simple.
  4. Thread: Handling f-write

    by kodax
    Replies
    21
    Views
    4,518

    in that case, all the files from the user's...

    in that case,
    all the files from the user's directory.
  5. Thread: Handling f-write

    by kodax
    Replies
    21
    Views
    4,518

    Mostly reading and writing..

    Mostly reading and writing..
  6. Thread: Handling f-write

    by kodax
    Replies
    21
    Views
    4,518

    From my observations, speed is reduced with large...

    From my observations, speed is reduced with large 8mb buffers, as compared to 256kb buffers..
    Without a doubt, large buffers decrease speed significantly.
  7. Thread: Handling f-write

    by kodax
    Replies
    21
    Views
    4,518

    8.6. Obtaining Large Buffers...

    8.6. Obtaining Large Buffers
  8. Thread: Handling f-write

    by kodax
    Replies
    21
    Views
    4,518

    c++ - Is using a bigger buffer useful? - Software...

    c++ - Is using a bigger buffer useful? - Software Engineering Stack Exchange


    This guy describes the correct theoretical scenario,
    which in itself is a paradox.

    How can one carry a giant sand...
  9. Thread: Handling f-write

    by kodax
    Replies
    21
    Views
    4,518

    Usually bufsize is 1024 and sometimes 4096. The...

    Usually bufsize is 1024 and sometimes 4096.
    The point was about the chance of a larger buffer failing..
  10. Thread: Handling f-write

    by kodax
    Replies
    21
    Views
    4,518

    I am not sure, but a larger buffer will have...

    I am not sure, but a larger buffer will have quite an impact,
    especially if you are short on RAM..

    fwrite consume free memory continuously - C++ Forum
  11. Thread: Handling f-write

    by kodax
    Replies
    21
    Views
    4,518

    He could be right. In fact, there is a...

    He could be right.

    In fact, there is a possibility that write()
    returns partial writes for larger buffers.
  12. Thread: Handling f-write

    by kodax
    Replies
    21
    Views
    4,518

    Handling f-write

    @hamster_nz
    The possibility of fwrite() / write() failing increases the larger the buffer ??
  13. Replies
    7
    Views
    1,621

    IBM Documentation...

    IBM Documentation


    IBM Documentation


    off_t is 32 / 64 bit integer,
    and with a large file, it will overflow.

    Author may be misinformed..
  14. Replies
    7
    Views
    1,621

    c++ - How does _stat() under Windows exactly work...

    c++ - How does _stat() under Windows exactly work - Stack Overflow
  15. Replies
    7
    Views
    1,621

    Also one has to take into account a performance...

    Also one has to take into account a performance issue,
    since fread / read requires a buffer.
  16. Replies
    7
    Views
    1,621

    Stat is posix. Even if fread / read can...

    Stat is posix.

    Even if fread / read can determine file size,
    is it a good approach ?
  17. Replies
    4
    Views
    751

    How do you know what I did not study, did you...

    How do you know what I did not study,
    did you examine my lab papers back then ??
  18. Replies
    4
    Views
    751

    If you do not understand a particular context,...

    If you do not understand a particular context,
    just don't add your half-formed opinion..
  19. Replies
    4
    Views
    751

    Two's Complement Exception or Flaw.

    Can this be considered a design flaw,
    or a regular exception ??


    int a = -2147483648;
    int b = ~a;

    b = 1 + b;
    printf("%d\n", a); /* Prints -2147483648. */
    printf("%d\n", b); /* Also...
  20. Replies
    7
    Views
    1,621

    Fseek Ftell Non-Compliant

    FIO19-C. Do not use fseek() and ftell() to compute the size of a regular file - SEI CERT C Coding Standard - Confluence


    Is a buffered fread / read to obtain size considered a bad approach,...
  21. Replies
    8
    Views
    2,795

    There's also a possibility that write() fails,...

    There's also a possibility that write() fails,
    and errno is 0.
  22. Replies
    8
    Views
    2,795

    Absolutely, it is poor code, it goes against the...

    Absolutely, it is poor code, it goes against the documentation,
    write() returns a value for a reason.

    The idea was to use write() without checking it's return value,
    and relying on errno...
  23. Replies
    8
    Views
    2,795

    Is there a possibility that write() is successful...

    Is there a possibility that write() is successful and errno may still be set,
    errno is a global..
  24. Thread: paw options

    by kodax
    Replies
    7
    Views
    2,036

    Why are you going through such pain, Given the...

    Why are you going through such pain,
    Given the fact that people will reject your work.
    Even folks like us, who go through the same thing, don't care.

    Unless there is serious financial...
  25. Replies
    8
    Views
    2,795

    Ignore Return Value of write()

    The conventional way to use write(),
    is to verify that the return value matches the number of bytes.

    But what could possibly go wrong,
    if the return value is ignored and errno is used..

    errno...
Results 1 to 25 of 114
Page 1 of 5 1 2 3 4