Search:

Type: Posts; User: mrbump2004

Search: Search took 0.01 seconds.

  1. Replies
    27
    Views
    2,329

    Not trying to insult anyone, I dont know any C...

    Not trying to insult anyone, I dont know any C and i'm getting rude remarks about my bad code, i'm not trying to write a magnificent program just need something that works thats all.

    I do listen...
  2. Replies
    5
    Views
    8,302

    Remove the newline from buffer

    Hi

    I've done fgets and store it but the thing is i dont want the newline it automatically stores. Any idea how to remove it? or not get it in the first place?

    Thanks
  3. Replies
    6
    Views
    1,407

    Still has Segmentation Fault even with changes...

    Still has Segmentation Fault even with changes you have suggested. I had this problem and fixed it by entering the sizes of my strings i've made some changes and its back, thing is this code does...
  4. Replies
    6
    Views
    1,407

    Segmentation Fault Again

    I dont see anything different, if anything this code is easier than it was



    char str1[1000] = "";
    char str2[1] = "^";
    char str4[1001] = "";

    printf("Enter : ");
  5. Replies
    27
    Views
    2,329

    My bad code works fine now with a do while loop,...

    My bad code works fine now with a do while loop, my research skills are fine hence the do while loop thanks anyway
  6. Replies
    27
    Views
    2,329

    fflush(stdin); doesn't work on linux though...

    fflush(stdin); doesn't work on linux though apparently, i just changed the earlier fscanf i had into fgets but that simply skipped too, with no way to clear the input stream in linux surely there...
  7. Replies
    27
    Views
    2,329

    http://www.cygwin.com/ml/cygwin/1998-12/msg00108.h...

    http://www.cygwin.com/ml/cygwin/1998-12/msg00108.html

    This is the same problem, but has no replies.
  8. Replies
    27
    Views
    2,329

    I can't get a small example to work. Literally...

    I can't get a small example to work. Literally though thats all there is. Everything else is below. I start the prog and it comes to that menu. I enter a number and it goes to the part i'm having...
  9. Replies
    27
    Views
    2,329

    Sorry its huge and i mean huge and its a bit...

    Sorry its huge and i mean huge and its a bit sensitive. It all works apart from this one bit but it did stop for inout when using scanf, i've added a little more


    printf("MENU\n");...
  10. Replies
    27
    Views
    2,329

    Should probably mention that this is on linux?

    Should probably mention that this is on linux?
  11. I posted it as reply then decided it needed its...

    I posted it as reply then decided it needed its own thread, someone had replied by then though, sorry
  12. Replies
    27
    Views
    2,329

    Chill it was an accident, i posted it then...

    Chill it was an accident, i posted it then removed it and created another thread
  13. Replies
    27
    Views
    2,329

    Thats it below, just doesn't pause for input?? ...

    Thats it below, just doesn't pause for input??


    char str1[50] = "";
    char str2[] = "^";

    printf("Enter : ");

    fgets (str1, sizeof str1, stdin);
  14. Replies
    27
    Views
    2,329

    Ta, did that but it doesn't pause for an input...

    Ta, did that but it doesn't pause for an input just streams straight past it??
  15. So how do I take input from a keyboard for a...

    So how do I take input from a keyboard for a whole line
  16. Replies
    27
    Views
    2,329

    Yep someone else told me that too, and it works...

    Yep someone else told me that too, and it works cheers, but the problem now is

    that scanf ("%s",str1);

    only returns the first word of whatever i type. If i add "Hello my name is Jon"

    and...
  17. Thanks it gets rid of the segmentation fault,...

    Thanks it gets rid of the segmentation fault, however if i type any number of words, like

    "Hello my name is Jon" it only take the word hello, am i using the wrong thing fgets?
  18. thanks for that. i created another thread for it,...

    thanks for that. i created another thread for it, sorry :D
  19. Replies
    27
    Views
    2,329

    possible pointer?

    I'm getting an error when running.

    Segmentation Fault for this bit of code?

    char str1[] = "";
    char str2[] = "^";
    char str3[] = "";

    printf("Enter: ");
    scanf ("%s",str1);
  20. There you go, knew it would be easy for someone,...

    There you go, knew it would be easy for someone, thanks a lot
  21. This is going to be very easy, now pointers?

    ok so I have a program its main function is

    int main(int argc, char *argv[])

    its the only function and when it gets to the bottom it closes. However I want it to go back to the top again. I...
Results 1 to 21 of 21