Search:

Type: Posts; User: exvor

Search: Search took 0.00 seconds.

  1. Thread: While loop issue

    by exvor
    Replies
    2
    Views
    1,211

    LOL yea i just realized that sorry for the post...

    LOL yea i just realized that
    sorry for the post and thanks
  2. Thread: While loop issue

    by exvor
    Replies
    2
    Views
    1,211

    While loop issue

    here is the code



    /* A simple computer simulator */

    #include<stdio.h>
    #define SIZE 100

    int main()
  3. Replies
    8
    Views
    1,522

    Sorry man page is kinda clusterd with scanf and...

    Sorry man page is kinda clusterd with scanf and sscanf and fscanf

    so I just checked it real fast. when i replied as to what is wrong
    in the above code im not sure yet as I couldent find this...
  4. Thread: c compiler help

    by exvor
    Replies
    5
    Views
    1,066

    .....doesnt.... mac osx come with gcc ??? ...

    .....doesnt.... mac osx come with gcc ???



    or did they remove that when they stole the nextstep code :)
  5. Replies
    1
    Views
    791

    Google is your friend i have found several...

    Google is your friend i have found several tutorials on
    gtk and networking and xlib and many others. this is of course
    if your not wanting to program in windows :)
  6. Replies
    16
    Views
    3,068

    They covered linked lists before they coverd...

    They covered linked lists before they coverd typedef ???


    dont sound like a very good book :p
  7. Replies
    19
    Views
    11,198

    Like i said doesent matter. With a good...

    Like i said doesent matter. With a good compilier like gcc its really a mute point. But i do understand why its not needed. :)
  8. Replies
    19
    Views
    11,198

    why is recasting the pointer from malloc...

    why is recasting the pointer from malloc incorrect. malloc returns a void pointer if your puting into a char pointer recasting would be correct. But again this is a mute point as this has been...
  9. Replies
    8
    Views
    1,522

    ok i think i have it tracked down here ...

    ok i think i have it tracked down here




    error = ((sscanf(line," %d", &n) != 1 || n <= 0) && (digit == 1));


    this error checking will not work if both a letter and a number are enterd...
  10. Replies
    8
    Views
    1,522

    wow talk about unreadablity the whold error...

    wow talk about unreadablity


    the whold error thing is messin me up

    what is your while statement checking for?


    ill continue to try and understand what you were doin here but if i
    ...
  11. Replies
    7
    Views
    2,785

    Ahh i see. So even if you use malloc to only...

    Ahh i see. So even if you use malloc to only allocate 4 bytes and you shove more data into the pointer to the 4 bytes of memory then scanf will read the entire string. I thought that scanf would...
  12. Replies
    7
    Views
    2,785

    also this used to be a function to a main program...

    also this used to be a function to a main program in another source file so this may be why it looks bad and the comments here make little sense.
  13. Replies
    7
    Views
    2,785

    yes but shouldent it messup because the memory...

    yes but shouldent it messup because the memory allocated for data is too small to hold the entire string of data.

    its called a buffer overrun because the data in the buffer stdin is longer then...
  14. Replies
    7
    Views
    2,785

    Strange scanf behavior

    Here is a small program i have written and I cannot figure out why my keyboard buffer is not behaving bad like it shouldwith this flawed code.

    also keep in mind this is not all of the code the...
  15. Replies
    41
    Views
    36,311

    I just read the man page for setbuf and yea your...

    I just read the man page for setbuf and yea your right that does not make alot of sense.


    lol well at least you got me to look at the man page :D now i know what setbuf does YAY !
  16. Replies
    17
    Views
    2,954

    haha quzah you crakin me up over here anyway...

    haha quzah you crakin me up over here

    anyway ive done this program when learning C and belive me dont feel bad i really messed mine up worse then this. LOL but i wont put people here though my...
  17. Replies
    41
    Views
    36,311

    inline bool Flush_Stream(FILE* stream) { ...

    inline bool Flush_Stream(FILE* stream)
    {
    void* p = malloc(BUFSIZ);
    if (p == NULL)
    {
    return false;
    }
    else
    setbuf(stream, p);
Results 1 to 17 of 17