Search:

Type: Posts; User: skytreader

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    8,861

    Ooops. While I typed my lengthy update, Bayint...

    Ooops. While I typed my lengthy update, Bayint posted a reply, which might've answered my new issues. Working on it now till I get new questions. Thanks Bayint!
  2. Replies
    7
    Views
    8,861

    Replies... That solves my problems with...

    Replies...



    That solves my problems with math.h. Thank you.



    I didn't know this but my main agenda is pthreads so it doesn't matter. Thank you for the info though.
  3. Replies
    7
    Views
    8,861

    Weird compile errors (gcc, pthread, math)

    Hi. I'm having compile errors with the following code which I cannot debug:



    #include <pthread.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>

    #define NTHREADS 32
  4. Replies
    3
    Views
    807

    Oh. Understood. Thanks. However, I'm still...

    Oh. Understood. Thanks.

    However, I'm still confused as to your use of **.

    & - gives the address of an object.
    * - gives the object a pointer points to.

    So if I declare a function
  5. Replies
    3
    Views
    807

    Pointers and LinkedLists

    Hi all. I'm having problems with the pointers I pass to functions operating on a singly linked list. See:



    typedef int ListElement;
    typedef struct listnode ListNode;
    typedef struct...
  6. Replies
    7
    Views
    1,699

    Solved!

    Yep. I noticed eventually and solved. I settled for a stack of pointers.

    (And also, the most recent code I posted is a big mistake, I realized. The codes in my first post get more things done...
  7. Replies
    7
    Views
    1,699

    Hopefully, a little less confusing now

    Salem. I think I get what you mean. In the next iteration, the contents of my local variables change and the contents of my stack as well. Hence, it goes well in the printf's but not afterwards.
    ...
  8. Replies
    7
    Views
    1,699

    Some further findings... Since it seems like...

    Some further findings...

    Since it seems like the problem occurrs after parse, I conducted some experiments on the printf's that followed (in my main function).

    If I make the order of printf's...
  9. Replies
    7
    Views
    1,699

    Binary Tree gets corrupted. Confusing...

    Hi all. I'm creating binary trees from some given data. Afterwards, I need to traverse it in level order. However, my binary tree seems to get corrupted as my code moves on from line to line.
    ...
  10. Replies
    3
    Views
    1,367

    Oh... That syntax pwned me real hard:confused:...

    Oh...

    That syntax pwned me real hard:confused:

    Well, thanks hk_mp5kpdw.
  11. Replies
    3
    Views
    1,367

    Program performs an illegal operation

    Hi all. I am having a problem creating a stack for defined structures. I've created stacks in C before, but, until now, used them only for predefined data types like char. I want a stack for binary...
  12. Replies
    3
    Views
    7,176

    jeffcobb, The way it sounds, memset() is the...

    jeffcobb,

    The way it sounds, memset() is the function I am looking for.

    And, also, I wasn't trying to free anything in the code I gave. I was just looking at what arrays hold right after...
  13. Replies
    3
    Views
    7,176

    How to "free" an array cell.

    Hi all. Suppose I have a char array of size 3 with the following contents:


    [a][b][\0]

    where \0 is the null pointer. Is there a way that I can make the array become


    [][b][\0]
  14. Replies
    10
    Views
    5,657

    In a moment's thought, I didn't realize that. ...

    In a moment's thought, I didn't realize that.

    My apologies if my being stubborn caused inconveniences. Again, I did not use the working code given in our reference book because I wanted my own...
  15. Replies
    10
    Views
    5,657

    Hi quzah. I did that just to make sure that my...

    Hi quzah. I did that just to make sure that my stack doesn't return any machine-level-y error messages to the user. My StackUnderflow and StackOverflow do nothing but state the obvious (i.e. that a...
  16. Replies
    10
    Views
    5,657

    Hello. I've found a solution to my problem....

    Hello. I've found a solution to my problem. Although satisfied that my pop works, it would still be nice if someone here can explain to me the difference I found.

    My original test:



    main(){...
  17. Replies
    10
    Views
    5,657

    Hello laserlight. I tried what you suggested and...

    Hello laserlight. I tried what you suggested and received the following output:



    K
    K
    K
    K
    K
    StackUnderflow occurred!
  18. Replies
    10
    Views
    5,657

    A Linked Stack in C

    Hello. I have a question with my linked stack implementation in C. I'm pretty new to C and especially pointers. Any help will be greatly appreciated.

    First of all, I tested my linked stack...
  19. Replies
    3
    Views
    1,842

    cas you got it all...much thanks. I'll have more...

    cas you got it all...much thanks. I'll have more light now in tackling this problem. Will try it out again as soon as I get some sleep...Again, thanks (--,)
  20. Replies
    3
    Views
    1,842

    Now it works, now it won't

    Hello. I'm trying to learn C using K&R. I've had some background with Scheme and Java programming so I'm guessing that K&R is the path to take to learning C.

    Earlier in the text, I wrote the...
Results 1 to 20 of 20