Search:

Type: Posts; User: salvadoravi

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. I can't believe I did such a stupied mistake. ...

    I can't believe I did such a stupied mistake.

    Thank you guys!
  2. Thank you hk_mp5kpdw. Howerver I still can't...

    Thank you hk_mp5kpdw.
    Howerver I still can't understand what I did wrong...
  3. Small code works on VS6 crash on VS2005 WHY???

    This code runs without problems on VS6, but crashes on VS2005 (I've just started to use VS2005)
    Please WHY??



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    typedef struct
  4. Replies
    12
    Views
    1,575

    Recursions killing me

    Hi guys,

    I just can understand recursions!
    This is really putting me down.
    I've started quite good, and I perfectly understand the following example:



    void MyRecursion ( int n )
    {
  5. I will adapt mat's suggestion too if the file is...

    I will adapt mat's suggestion too if the file is sorted. (thank you)
    and Todd's if not (thank you too)
    I still don't understand how can I resize a file size on Windows....
  6. Cheers! How do I resize a file?

    Cheers!

    How do I resize a file?
  7. The best way to delete a record from a file?

    Hi ALL,

    Lets say I have a file name "cars.bin".
    Each record in the file is a struct (made from int, char [20], int).
    Lets say I have 10000 records,
    struct 1, struct 2, struct 3, struct .....,...
  8. Thread: rand()

    by salvadoravi
    Replies
    8
    Views
    9,267

    Sorry for the stupied question, it makes alot of...

    Sorry for the stupied question, it makes alot of sense and I should figure it out from Prelude reply . (too much computer for one day....)

    Thanks again
  9. Thread: rand()

    by salvadoravi
    Replies
    8
    Views
    9,267

    Guys when I use the following loop for...

    Guys when I use the following loop



    for (i=0;i<20;++i)
    {
    srand(time(NULL));
    printf("&#37;d\n",rand()%((10)+1));
    }
  10. Thread: rand()

    by salvadoravi
    Replies
    8
    Views
    9,267

    rand()

    Hi again,

    I know that if I want to get different random values I should use srand() before using rand(), my questions are:

    1) Why using srand() inside a loop will produce the same results?

    ...
  11. Replies
    6
    Views
    1,970

    Got IT now!!! Thank you pros

    Got IT now!!!
    Thank you pros
  12. Replies
    6
    Views
    1,970

    Thanks for your replies guys, I will rephrase...

    Thanks for your replies guys,

    I will rephrase the question.
    Why buf[0] not set to NULL when fgets read the end of the file?

    Thanks again
  13. Replies
    6
    Views
    1,970

    feof() from FAQ

    Hi guys,

    I've just read the FAQ about NOT to use feof(fp) to check if we reached the end of the file.
    It all make sense but I don't understand 1 thing...



    while (!feof(fp))
    {
    ...
  14. Replies
    2
    Views
    1,059

    Thank you!!

    Thank you!!
  15. Replies
    2
    Views
    1,059

    fflush(myFile)

    Hi Guys,

    After getting some brilliant replies about fflush(stdout), I would like to get some details about flushing a file.

    When Should I fflush a file when writing stream to a file when I use...
  16. Got it, This is my stdio.h macro for BUFSIZ ...

    Got it,

    This is my stdio.h macro for BUFSIZ


    #if defined(_M_MPPC)
    #define BUFSIZ 4096
    #else /* defined (_M_MPPC) */
    #define BUFSIZ 512
    #endif /* defined (_M_MPPC) */
  17. Sorry guys what is BUFSIZ?

    Sorry guys what is BUFSIZ?
  18. Replies
    5
    Views
    6,665

    Brilliant, thank you!

    Brilliant, thank you!
  19. Replies
    4
    Views
    2,648

    Yep. I've created a 3000,000 kb. ftell() gave...

    Yep.

    I've created a 3000,000 kb.
    ftell() gave the right result until MAX_LONG after that it return -1.

    I actully created 9.5 GB file.
    Anyone know what is the limit in windows XP?

    Many...
  20. Replies
    9
    Views
    39,539

    Thank you great stuff!

    Thank you great stuff!
  21. Replies
    3
    Views
    8,434

    Cheers!!

    Cheers!!
  22. Replies
    5
    Views
    91,381

    Thanks a million

    Thanks a million
  23. Replies
    4
    Views
    2,648

    Max file size

    Hello again,

    If ftell() return long type, is that mean that the maximum file size possible is LONG_MAX ??
  24. Replies
    3
    Views
    8,434

    stdio.h cstdio.h

    Hiiiii guys,

    What is the difference between stdio.h and cstdio.h ??

    Thank you!
  25. Replies
    5
    Views
    91,381

    fflush(stdout)

    Do I need to use:


    fflush(stdout);

    Each time I print something to the screen (printf, puts, putchar.....) ?
    If So why?


    Many thanks !!!
Results 1 to 25 of 84
Page 1 of 4 1 2 3 4