Search:

Type: Posts; User: vince3214

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,298

    omg....thx... stupid mistake...lol

    omg....thx... stupid mistake...lol
  2. Replies
    3
    Views
    1,298

    sry is not causing seg fault any more... just...

    sry is not causing seg fault any more... just print some random stuff in the first line of my result.txt
  3. Replies
    3
    Views
    1,298

    what could cause seg fault in this code?

    I'm designing a program for appending a few lines at certain line from a file.
    the procedure is read from a file & store the lines into a link list, append at certain line then write it to...
  4. Replies
    8
    Views
    1,621

    hmm thx a lot ~but still i wanna learn how to use...

    hmm thx a lot ~but still i wanna learn how to use debugger properly :) i think i didn't install it, i thought it was within cygwin
  5. Replies
    8
    Views
    1,621

    so what should i type in after compile?...

    so what should i type in after compile?
    shouldn't it be gdb./mycode ?
    but command not found from cygwin
  6. Replies
    8
    Views
    1,621

    also i dont really understand the message from...

    also i dont really understand the message from debugger ;(
  7. Replies
    8
    Views
    1,621

    Yea I think learning how to use debugger is...

    Yea I think learning how to use debugger is really important but I dont know how to install it into my computer(i have compiler though, call "cygwin")
    the only place i can use debugger is at school...
  8. Replies
    8
    Views
    1,621

    C programming Seg fault help

    :frown:
    I'm making a line editor(for a file) & up tp append function.(type in "a")
    the append function is to append something after the current line.
    im now getting seg fault but cant really find...
  9. well assume input is a string and compare with...

    well assume input is a string and compare with "\n"
    if my input is return(enter), is it gonna return 0?
  10. is it possible to compare a string with return?

    by using strcmp i think it's not working

    strcmp(input,"\n");
    can anyone help?
  11. Replies
    5
    Views
    27,906

    thanks a lot. my problem seems to be reading the...

    thanks a lot. my problem seems to be reading the file each time i call ScanInput;
  12. Replies
    5
    Views
    27,906

    this is my code & its design for reading a file...

    this is my code & its design for reading a file and edit. and we can type in various command like "p" print out the data in file(which is the one cause the problem).

    also,does -g mean using gdb to...
  13. Replies
    5
    Views
    27,906

    #include #include...

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

    #define NUMBERLINES 1000 // max number of lines that can be read
    #define LINELENGTH 1000 // max length of a line
    #define FNAMELENGTH...
  14. Replies
    5
    Views
    27,906

    glibc detected

    What will cause this kind of problem? I know it might be helpful to bring up my code. But it's pretty much a mess.

    *** glibc detected *** ./led: malloc(): memory corruption: 0xb77e67bf ***...
  15. Replies
    12
    Views
    1,560

    *every

    *every
  16. Replies
    12
    Views
    1,560

    should I initialize ever s->next = NULL then give...

    should I initialize ever s->next = NULL then give them value in the loop?
  17. Replies
    12
    Views
    1,560

    oh wait..the problem occur after the loop, thx a...

    oh wait..the problem occur after the loop, thx a lot for ur help!
  18. Replies
    12
    Views
    1,560

    I'm not quite getting it, say s is a pointer that...

    I'm not quite getting it, say s is a pointer that will go through every nodes in the list, should I do "s = s -> next" to move pointer s to the next node?
  19. Replies
    12
    Views
    1,560

    if(argv[1] != NULL){ if((fp =...

    if(argv[1] != NULL){
    if((fp = fopen(argv[1],"r")) != NULL) {
    while (fgets(line, 1000, fp) != NULL) {
    s = malloc(sizeof(NodeT*));
    strcpy(s->line,line);
    s = s->next;...
  20. Replies
    12
    Views
    1,560

    This is what i got by now #include...

    This is what i got by now


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

    typedef struct Node {
    char line[1000];
    struct Node *next;
  21. Replies
    12
    Views
    1,560

    i did put them but forgot to post them ;P i free...

    i did put them but forgot to post them ;P i free them at the end....but after i malloc those two, im still getting seg fault.

    NodeT *s = malloc(sizeof(NodeT* ));
    NodeT *head =...
  22. Replies
    12
    Views
    1,560

    C programming Seg fault help

    This is my program to read a file & print the lines out,
    since im not familiar with link list, i got a seg fault from this.
    Anyone can help me out,thx?




    #include<stdio.h>...
Results 1 to 22 of 22