Search:

Type: Posts; User: plot

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    617

    Help with vector inheritance

    So I have a class similar to this:




    class Something : public vector<putData*>
    {
    iterator pos;

    public:
  2. Replies
    1
    Views
    604

    Need help with overriding operators

    I need to override an operator = to call a function but I dont know how to do this. Here is a sample of my problem:



    class Food
    {
    insertFood(Fruit f)
    {
    //Inserts the fruit
    }
  3. Replies
    4
    Views
    1,147

    Thank you that seemed to have fixed the issue I...

    Thank you that seemed to have fixed the issue I was having.
  4. Replies
    4
    Views
    1,147

    I did that but it will only print one line I dont...

    I did that but it will only print one line I dont know why it would not print other lines in the input file which are formated the same way.
    here is what I did:

    char temp[500];
    char grade;
    int...
  5. Replies
    4
    Views
    1,147

    How to read this file input

    So I need to read a file that has this input and need to delete the cama and semicolen in the string but idk how to ignore the cama and semicolon:

    ex of input file:

    A firstname, lastname; 13
    ...
  6. Replies
    2
    Views
    685

    Never mind I fixed it

    Never mind I fixed it
  7. Replies
    2
    Views
    685

    Breadth-first tree transversal

    Here is my code that I wrote that is suppose to print a tree row by row but is not working and not print the right info.

    I pased the root of the tree.

    BST_BFS(tree->root);



    //data:
  8. Replies
    6
    Views
    1,729

    Okay so I just changed everything to a single...

    Okay so I just changed everything to a single link list just to make it easier to add in doubly linked list (so I hope), this code should also sort data:




    #include <stdio.h>
    #include...
  9. Replies
    6
    Views
    1,729

    Help with doubly linked List

    I have been bashing my head for two hours trying to figure out how to insert a node and print it out. I am not sure if I am doing this correctly or if I am missing anything. It seems that the head...
  10. Okay so I solved it by doing this: ...

    Okay so I solved it by doing this:



    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>
    int **test();
    void printData(int**);
  11. Okay I see what you are trying to say now. But...

    Okay I see what you are trying to say now. But how would you do this to array pointers in pointer notations?
  12. U is a pointer to y.x

    U is a pointer to y.x
  13. Thats what I did? If you take out the typedef...

    Thats what I did? If you take out the typedef struct and declare X as a variable in main (int **x) and is using X it works. But with typedef it wont work like that and not sure why. It is however...
  14. using typedef struct and pasisng pointers to functions

    I am haivng problms with passing my values through functions. Can someone help find my problem or provide a solution.

    Here is my code:



    #include<stdio.h>
    #include<stdlib.h>...
  15. Thread: Ussing reaalloc

    by plot
    Replies
    4
    Views
    877

    I checked if the value of size is getting passed...

    I checked if the value of size is getting passed to other functions and yes, using the same sample output i get the length of theString = 7(in the function), size = 86

    Both seem correct but length...
  16. Thread: Ussing reaalloc

    by plot
    Replies
    4
    Views
    877

    Ussing reaalloc

    I need to use reaalloc to extend the memory when it goes out of bounds but I am not getting a correct output.


    this is how i am trying to realloc


    if(strlen(theString) - strlen(searchFor) +...
  17. Replies
    7
    Views
    1,587

    I kind of fixed the issue buy deleting all that...

    I kind of fixed the issue buy deleting all that and using one for loop.

    Sorry that I did not provide the full code, this was a small portion of my program and did not want to put it all here.
    ...
  18. Replies
    7
    Views
    1,587

    this is what I have: for(i = (loc -...

    this is what I have:


    for(i = (loc - theString); i < strlen(theString); i++)
    {
    for(j = 0; j < strlen(searchFor); j++)
    {
    printf("\nthe start:%c\n", *(theString + i));
    if((counter) <...
  19. Replies
    7
    Views
    1,587

    How to shift strings down in an array

    I am having this problem were the user types in a substring to search in the main string and replace it with another string

    for example:

    string: hello
    sub string: el
    replace: i

    should...
Results 1 to 19 of 19