Search:

Type: Posts; User: Brandon Smith

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,372

    I can't seem to spot the difference's in my code...

    I can't seem to spot the difference's in my code that was allowing -> to work before, and now the dot notation to work. Can you explain the difference?
  2. Replies
    5
    Views
    1,372

    Pointer Type Argument

    I have used this exact code numerous times in the past weeks, and it has always worked flawlessly.



    typedef struct _LLNode
    {
    int x;
    int y;
    int z;
    int dx;
  3. Doh! Got it, just missing a list->head = n; at...

    Doh! Got it, just missing a list->head = n; at the end of my add to front.

    Thanks so much anduril462, you've been so much help.
  4. Just realized that this is actually "adding to...

    Just realized that this is actually "adding to tail".

    The output for case 3 should be "data 20; data 10"
    The output for case 4 should be "data 30; data 20; data 10"
    The output for case 5 should...
  5. Thank you for your response, I would've never...

    Thank you for your response, I would've never caught that it was pointing to the updated source. Whoops! However, something still doesn't seem right! My traverse function now loops forever and keeps...
  6. This is the print function, called as a function...

    This is the print function, called as a function pointer in traverse


    void print_int(void* node){
    lnode *converted_node=(lnode*)node;
    int *p=(int *)converted_node->data;
    int a=*p;...
  7. Thank you for your input, but this isn't...

    Thank you for your input, but this isn't necessarily correct. My lists are updating, the nodes are being added.
  8. Add to Front, Remove from Front, Traverse

    I have a doubly linked, continuous list that I am having some troubles with. It seems as if my pointer reassignments aren't working correctly, even though they appear to be logically accurate.

    My...
  9. Replies
    10
    Views
    8,430

    I couldn't agree more, just teach us right the...

    I couldn't agree more, just teach us right the first time. The next assignment was doubly linked list, in a circular fashion. I guess it's just a good learning experience to figure it out the long...
  10. I came to the forums for help, you're correct. If...

    I came to the forums for help, you're correct. If you don't wish to provide it then by all means, don't. But your trolling doesn't help anyone.
  11. I am fully aware of what I am trying to...

    I am fully aware of what I am trying to accomplish here, and my code does essentially exactly what your psuedo code describes. At least I thought it did.
  12. Well, the following fails to run: while(hd...

    Well, the following fails to run:


    while(hd != NULL)


    I originally had it in the following for loop:


    for (hd = list->head; hd->next; hd = hd->next)
  13. Adding to Linked List in Order, minor error

    I have a function that is supposed to iterate through and create 10 random values, adding the values into the linked list each iteration in numeric order. I have the basis of my function down,...
  14. Replies
    10
    Views
    8,430

    This is my updated Add_to_Tail function, getting...

    This is my updated Add_to_Tail function, getting closer, but still not sure where to go from here.


    void Add_to_Tail(List *list, List *newnode)
    {
    if(!list->head)
    {
    list->head =...
  15. Replies
    10
    Views
    8,430

    I know I need to do this, but I have no idea how...

    I know I need to do this, but I have no idea how to, hence this post.
  16. Replies
    10
    Views
    8,430

    I have to add to tail. Adding to the head is very...

    I have to add to tail. Adding to the head is very simple, and I've got the function for that! Just having trouble figuring out the tail.
  17. Replies
    10
    Views
    8,430

    Unfortunately, I can only use a head pointer....

    Unfortunately, I can only use a head pointer. Which I guess means I would have to iterate through every time I "Add_to_Tail" until it comes back NULL, i.e the end?
  18. Replies
    10
    Views
    8,430

    Linked List - Add to Tail

    I am working on an assignment, and need to write a function to add a new node to the tail of a linked list. My code so far is as follows.



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

    typedef...
  19. Replies
    1
    Views
    2,527

    Tons of File/Directory Manipulation.

    I have read into the FindFirstFile and FindNextFile functions for windows extensively, and read numerous threads on the topic, but can't seem to break it down and figure out how to use it for what I...
  20. Replies
    6
    Views
    6,895

    edit: rebooted netbeans, and everything is...

    edit: rebooted netbeans, and everything is operational oddly enough.
  21. Replies
    6
    Views
    6,895

    Well it is compiled with Cygwin, NetBeans...

    Well it is compiled with Cygwin, NetBeans shouldn't cause this error. And the difference in \r and \n would change things. Linux expects \n, windows \r\n and mac \r, so this could effect things. ...
  22. Replies
    6
    Views
    6,895

    Well, if any of them worked I wouldn't have...

    Well, if any of them worked I wouldn't have posted this. The solutions I saw were to try what I mentioned above, i.e. the different file types and the different commands for newline/carriage return.
  23. Replies
    6
    Views
    6,895

    fprintf not printing newline

    I have searched around and have found that this is a pretty common error, but fprintf isn't printing newline/return carriages.



    FILE *index;
    index = fopen("index.html", "w");
    fprintf(index,...
  24. Replies
    16
    Views
    2,185

    This did not resolve the error, please provide...

    This did not resolve the error, please provide the code so I can understand it.
  25. Replies
    16
    Views
    2,185

    I understand the bitwise operations and how...

    I understand the bitwise operations and how memcpy's suggestion accomplishes the goal. However, I still do not understand how to do this without bitwise operators and using the 3rd room "c".
    I have...
Results 1 to 25 of 32
Page 1 of 2 1 2