Search:

Type: Posts; User: joatmon

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    766

    Perfect. Easy solution. Exactly what I needed....

    Perfect. Easy solution. Exactly what I needed. Thank you!
  2. Replies
    3
    Views
    766

    Can't get Mutual Exclusion to Work

    I have a program that spawns a number of threads. Each thread generates a table of output. During the time that it is creating this output, I don't want the other threads to be outputting, so I've...
  3. Replies
    4
    Views
    860

    Thanks. I tried that method many times, but never...

    Thanks. I tried that method many times, but never successfully. I'm giving up. Linked lists hurt my brain. Arrays here I come.
  4. Replies
    4
    Views
    860

    Thanks. How then do I create a new node that will...

    Thanks. How then do I create a new node that will survive beyond the scope of the current iteration? I'm very confused.
  5. Here is a way that I have done this: char*...

    Here is a way that I have done this:


    char* serialized = malloc(3*sizeof(int)); // allocate enough memory to store your entire struct
    bzero (serialized, 3*sizeof(int)); // or use memset...
  6. Replies
    4
    Views
    860

    Trouble Iterating over Linked List

    I have a singly-linked list. I am confident that I have the list set up and the data populated. However, when I go to print out the contents of the list, I'm not able to traverse it.


    int...
  7. Replies
    2
    Views
    564

    Ack! Thanks.

    Ack! Thanks.
  8. Replies
    2
    Views
    564

    Parsing String and Capturing in Variables

    I have an input file that contains any number of lines. Each line will follow the same structure. There will be 5 fields, separated by 4 commas. Fields 1 and 3 will be single characters, fields 2,4,5...
  9. Replies
    11
    Views
    989

    Thanks. That works. Finally. I guess that I'm...

    Thanks. That works. Finally. I guess that I'm confused as to when I have to call malloc and when I don't. A couple of posts ago, I thought you told me that I needed to call malloc after my function...
  10. Replies
    11
    Views
    989

    This is killing me. A simple string...

    This is killing me. A simple string concatenation. Unbelievable.


    filename = "client/";
    fprintf(stderr, "filename: %s\n", filename);

    char* temp = get_filename(selection);...
  11. Replies
    11
    Views
    989

    Wow, I didn't know that. I usually program in...

    Wow, I didn't know that. I usually program in Java, and we do this all the time. But what's wrong with this:


    filename = "client/";
    fprintf(stderr, "%s\n",...
  12. Replies
    11
    Views
    989

    Thanks. I understand what you are saying. But...

    Thanks. I understand what you are saying. But then I try this, and I still get a segmentation fault:


    char* temp;
    temp = malloc(strlen(get_filename(selection))+1);
    strcpy(temp,...
  13. Replies
    11
    Views
    989

    Help Working with a char*

    I have a function that returns a char*. No problem. But I need to concatenate another array with the results of this function. I'm getting a segmentation error.

    What am I doing wrong? Thanks.

    ...
  14. Capturing Command Line Inputs as Variables

    Just simply trying to capture the command line inputs, but I get a segmentation fault:

    fprintf(stdout, "host: %s\n", argv[1]);
    fprintf(stdout, "sizeof: %lu\n", sizeof(argv[1]));

    ...
  15. Replies
    4
    Views
    2,836

    Thanks!

    Thanks!
  16. Replies
    4
    Views
    2,836

    strtok difficulties

    I have a character array that will have a prefix and then a filename that will be between two square brackets. Something like this;

    get[filename]

    I need to isolate the characters between the...
  17. Replies
    7
    Views
    1,788

    Is there anybody who can answer this question? I...

    Is there anybody who can answer this question? I appreciate his help, but he did not really attempt to answer my question. All he did was tell me that it did'n't matter. I am quite sure that gdb can...
  18. Replies
    4
    Views
    27,661

    It's not inlined. I got it to work by writing it...

    It's not inlined. I got it to work by writing it in a different function. No idea why it worked in one place but not in the other. Thanks for your help.:)
  19. Replies
    7
    Views
    1,788

    I'm putting this in the gdbinit file. I...

    I'm putting this in the gdbinit file. I appreciate your help, but I respectfully ask that you limit your response to answering my question, not spinning me around in circles like so many do on these...
  20. Replies
    7
    Views
    1,788

    Can't. I'm programming this, and the line number...

    Can't. I'm programming this, and the line number changes all the time.
  21. Replies
    7
    Views
    1,788

    Setting a Break Point in GDB

    Can anybody tell me how to set a breakpoint in gdb on a function that returns a pointer? I know that for foo():

    break foo

    will take care of it, but what if I have

    void *foo()

    I...
  22. Replies
    4
    Views
    27,661

    Thanks. When I call other functions, it seems to...

    Thanks. When I call other functions, it seems to work. There is something about the one that I am trying to call that isn't working out. Too much code to post here. I'm probably overlooking something.
  23. Replies
    4
    Views
    27,661

    Calling a function from within GDB

    I working in GDB to debug my program. At various breakpoints, I want to call a function that I wrote that iterates through my heap at that point in the execution. I have seen that I can call this...
  24. Replies
    3
    Views
    5,939

    Need to understand Assembly Test and JE

    I'm trying to decipher some assembly code and have come across these two lines:

    test %ebx,%ebx
    je 8048e04

    %ebx holds the value 0x804c600, which in turn holds the value 0x24.

    What I think...
  25. Replies
    11
    Views
    1,881

    Thank you, BigH. That helps. I was doing my...

    Thank you, BigH. That helps. I was doing my shift before converting to binary, which was screwing everything else up. I appreciate your help.


    iMalc: While I appreciate any help offered to a...
Results 1 to 25 of 35
Page 1 of 2 1 2