Search:

Type: Posts; User: MattW

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Linked List help

    by MattW
    Replies
    17
    Views
    1,562

    Ok screw it. I am gonna go get something to eat....

    Ok screw it. I am gonna go get something to eat. I will be on shortly.
  2. Thread: Linked List help

    by MattW
    Replies
    17
    Views
    1,562

    Wait... you never have any way for the caller to...

    Wait... you never have any way for the caller to get the new pointer.
  3. Thread: Linked List help

    by MattW
    Replies
    17
    Views
    1,562

    Ok but I am looking at your debugger display pic...

    Ok but I am looking at your debugger display pic you attached. What is the dizzle with no 1.0, 2.876 link in the list?
  4. Thread: Forum Decorum

    by MattW
    Replies
    22
    Views
    2,880

    I had never found you to be particularly guilty...

    I had never found you to be particularly guilty of such things. I know I am totally guilty of tangents as-are Elysia, laserlight, CornedBee, Mk27, Matus and Thantos. But none of us like totally start...
  5. Replies
    7
    Views
    1,188

    You are welcome bro.

    You are welcome bro.
  6. Thread: Linked List help

    by MattW
    Replies
    17
    Views
    1,562

    Is that what you even wanted to do? If so, go for...

    Is that what you even wanted to do? If so, go for it. Then you don't need to add those other lines. I simply noticed you do not end up capturing the first line of values.
  7. Replies
    10
    Views
    2,222

    void realloc_or_die(void **p, size_t size) { ...

    void realloc_or_die(void **p, size_t size)
    {
    void *tmp = realloc(*p, size);
    if(tmp)
    {
    *p = tmp;
    return;
    }

    free(*p);
  8. Replies
    20
    Views
    1,467

    Why not just take the number as a string, then...

    Why not just take the number as a string, then flip the string? I think its computationally less complex since theoretically you have it as a string to begin with.
  9. Replies
    9
    Views
    1,282

    Sure...

    Sure :) Obviously you would need to do some modification to that code since its for Windows structures.
  10. Thread: Linked List help

    by MattW
    Replies
    17
    Views
    1,562

    You can add me, I am about to go out to lunch....

    You can add me, I am about to go out to lunch. master5001@hotmail.com. I was simply stating that sscanf() is going to always crash when you read random characters. By setting line[] = "" you at least...
  11. Replies
    7
    Views
    1,188

    Those are mathematical expressions. In...

    Those are mathematical expressions. In programming an assignment operator works by setting x to y when x = y. It is not commutative. Which if you think about it makes sense. Wouldn't every line of...
  12. Replies
    20
    Views
    1,467

    Hmmm I remember seeing this question some time...

    Hmmm I remember seeing this question some time last week. Perhaps doing a forum search would benefit you.
  13. Replies
    35
    Views
    3,659

    You know that the vertical ticks are every 2...

    You know that the vertical ticks are every 2 spaces and the horizontal spaces are every 4 spaces and vary by one vertical unit up or down. So why not utilize these facts and write a separate function.
  14. Replies
    7
    Views
    1,188

    Give that the flop-a-doo. nc = strlen(fulln);

    Give that the flop-a-doo. nc = strlen(fulln);
  15. Replies
    9
    Views
    1,282

    Yeah that is a good way to do it. There is...

    Yeah that is a good way to do it. There is actually an algorithm that is oh so cool for doing this exact thing, but methinks your professor would know it isn't of your design. I find it to be a very...
  16. Thread: Linked List help

    by MattW
    Replies
    17
    Views
    1,562

    As it should crash. char line[101] = ""; ...

    As it should crash.



    char line[101] = "";


    Tada :)
  17. Replies
    10
    Views
    2,222

    I dunno dude, you may wish to consider over...

    I dunno dude, you may wish to consider over allocating if anything. Reallocating data is tricky and slow business. Not to mention you are not even correctly using realloc().
  18. Replies
    9
    Views
    1,282

    One way of doing this would be to keep track of...

    One way of doing this would be to keep track of what months fall on what days of the year. Just be sure to account for leap years.
  19. Thread: Linked List help

    by MattW
    Replies
    17
    Views
    1,562

    Ok cool, I see ...

    Ok cool, I see



    fgets(line,sizeof(line), input_stream); // Delete this line.

    while (((line_ptr=fgets(line,sizeof(line),...
  20. Thread: Linked List help

    by MattW
    Replies
    17
    Views
    1,562

    Hmmm wtf happened to line 1? (1.0 2.876) Its not...

    Hmmm wtf happened to line 1? (1.0 2.876) Its not in the list. Lemme look at your code real quick.
  21. Replies
    9
    Views
    1,282

    I sooooooo have nifty code to do this for you....

    I sooooooo have nifty code to do this for you. But it would be wrong of me to do this for you. So I will make a compromise. You try, and I will give you my code.
  22. Replies
    35
    Views
    3,659

    You are welcome, but I would feel embarassed to...

    You are welcome, but I would feel embarassed to say I feel like I helped you while you still have those nasty loops in your code :(
  23. Thread: Linked List help

    by MattW
    Replies
    17
    Views
    1,562

    If that is your desired result shouldn't your...

    If that is your desired result shouldn't your code be something like

    Option 1:


    current_measurements_ptr -> next=(struct measurements*)malloc(sizeof(struct...
  24. Replies
    35
    Views
    3,659

    Thanks for giving me credit, but I would actually...

    Thanks for giving me credit, but I would actually say Salem is absolutely right and you should simply change max = maxx-min;
  25. Here...

    Here is one I found whilst looking for an MFC usage of SetWindowPos().
Results 1 to 25 of 50
Page 1 of 2 1 2