Search:

Type: Posts; User: drater

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    6,098

    I fixed my errors for add a character and delete...

    I fixed my errors for add a character and delete a character:


    f = linkedListStrings[indexValue];
    needed to be:

    front = f = linkedListStrings[indexValue];

    for both methods and now they...
  2. Replies
    12
    Views
    6,098

    My insert character method seems to delete the...

    My insert character method seems to delete the index of the linked list that I want to manipulate. I don't free anything in it though... Can anyone see anything that I am doing wrong?
  3. Replies
    12
    Views
    6,098

    I fixed all of my index pointer warnings a better...

    I fixed all of my index pointer warnings a better way, and added 2 other methods that don't seem to be working correctly. I am having trouble deleting characters from a specified position and adding...
  4. Replies
    12
    Views
    6,098

    if(f != NULL) { node3->next = temp; node3 =...

    if(f != NULL)
    {
    node3->next = temp;
    node3 = node3->next;
    }

    so if f is null don't set the value the next node which makes it null
  5. Replies
    12
    Views
    6,098

    I was getting warning messages when I didn't have...

    I was getting warning messages when I didn't have a pointer to the index. That got rid of warning.
  6. Replies
    12
    Views
    6,098

    Concatenating in linked list

    #include <stdio.h>
    #include <stdlib.h> // needed for malloc, free


    struct node { // a node in the linked list
    char data;
    struct node *next;
    };

    int menu(void); // display list of...
  7. Replies
    30
    Views
    4,827

    I edited my previous post where I had posted my...

    I edited my previous post where I had posted my code. Even though I have a printf statement to print the list at the given location that they requested, It does not print anything. It does return me...
  8. Replies
    30
    Views
    4,827

    I meant it doesn't display Love instead of...

    I meant it doesn't display Love instead of programming. Instead it just freezes.
  9. Replies
    30
    Views
    4,827

    #include #include ...

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


    struct node
    {
    char data;
    struct node *next;
    };
  10. Replies
    30
    Views
    4,827

    Yeah it's not really a lesson on how to use a...

    Yeah it's not really a lesson on how to use a linked list well and efficiently, its just a lesson on how to use it.
  11. Replies
    30
    Views
    4,827

    So now that I can add things to my list and have...

    So now that I can add things to my list and have null nodes separating them, I want it so if a person says they want to output the string at index 1, for the list:...
  12. Replies
    30
    Views
    4,827

    Works great, thank you for all the help!

    Works great, thank you for all the help!
  13. Replies
    30
    Views
    4,827

    for: if(f), there is no condition, so is it...

    for: if(f), there is no condition, so is it supposed to be if ( f != NULL)?
  14. Replies
    30
    Views
    4,827

    I still don't think I am using it correctly, I...

    I still don't think I am using it correctly, I tried doing:

    front = response[0];
    addString(front, response);
    But that wasn't correct either.
  15. Replies
    30
    Views
    4,827

    I added: struct node *addString(struct...

    I added:



    struct node *addString(struct node *f, const char *response)


    int main(void)

    int menu(void)
  16. Replies
    30
    Views
    4,827

    I was able to fix my prior questions, but I am...

    I was able to fix my prior questions, but I am trying to create 3 char arrays and place each character into a node with a null node to separate each word.



    #include <stdio.h>
    #include...
  17. Replies
    30
    Views
    4,827

    How do i return everything in the linked list...

    How do i return everything in the linked list rather than having to return each individual node?
  18. Replies
    30
    Views
    4,827

    struct node *insert(struct node *f, char...

    struct node *insert(struct node *f, char response)
    needed to be:


    struct node *insert(struct node *f, char *response)


    And it fixed that error, but I still have a logic error where it only...
  19. Replies
    30
    Views
    4,827

    I am trying a new approach since my last post,...

    I am trying a new approach since my last post, and I am not sure if the logic is right or why my syntax is incorrect.


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


    struct node {
    char...
  20. Replies
    30
    Views
    4,827

    I am not sure what you mean about the buffer...

    I am not sure what you mean about the buffer overrun. I added a print method but for some reason, now my program crashes when I want to print out the linked list. I also think my previous code was...
  21. Replies
    30
    Views
    4,827

    After adding f = front, I get the first node to...

    After adding f = front, I get the first node to print correctly but all/most after do not correctly print.
  22. Replies
    30
    Views
    4,827

    I fixed my previous code, but now when I try and...

    I fixed my previous code, but now when I try and add a separate method it no longer works again.



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


    struct node {
    char data;
  23. Replies
    30
    Views
    4,827

    Linked list acting as string

    I am trying to add characters to each node of a linked list.


    #include <stdio.h> // NULL defined here
    #include <stdlib.h> // malloc

    struct node
    {
    ...
  24. Replies
    3
    Views
    1,117

    I added: while((getc(fp1)) != EOF) {...

    I added:


    while((getc(fp1)) != EOF)
    {
    textArrayPointer--;
    }


    after:
  25. Replies
    3
    Views
    1,117

    Encryption problem

    I am encrypting text from a file and storing the newly encrypted message in a text file.

    If the ith char is an uppercase letter, shift it to be the char x[i] away where x = {3, -1, 0, 2, -2}
    If...
Results 1 to 25 of 47
Page 1 of 2 1 2