Search:

Type: Posts; User: blunt

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    18
    Views
    5,870

    That's pretty much what I want. I need to create...

    That's pretty much what I want. I need to create my own base with this program, I need to edit this information and in the end, before I go out of the program I want it to be saved (not during...
  2. Replies
    18
    Views
    5,870

    You say I should do this line by line or I...

    You say I should do this line by line or I misunderstood?
  3. Replies
    18
    Views
    5,870

    Thanks for help! There are also few good ideas...

    Thanks for help! There are also few good ideas that I could use BUT:
    first of all I'd like it to be fully-working program. For now I have two classes: movie and customer. I can add and delete...
  4. Replies
    18
    Views
    5,870

    I use counter which role is to remember how...

    I use counter which role is to remember how movies are in base, I write an example so You could see what I mean:



    int id_movie=0;
    (...)
    movie_base[id_movie].setMovie();
    id_movie++;
  5. Replies
    18
    Views
    5,870

    Because it's not the first time today I see...

    Because it's not the first time today I see someone's mentioned these vectors I decided to give it a shot... and I'm confused a litte.

    So I have my class movie, I declare vector:



    vector...
  6. Replies
    18
    Views
    5,870

    DVD rental application.

    Hello there!

    I'm in a middle of my DVD rental project. It's my first bigger thing in c++ and I had my c++ classes long time ago, so I have a few issues and difficulties.

    So, I have a class:

    ...
  7. Replies
    2
    Views
    1,497

    I feel like a stupid, pointers:

    Hey, I'm reading now a C++ tutorial from cprogramming.com, lesson about a structures. And I see now and example of pointers in structures:

    #include <iostream>
    using namespace std;

    struct xampl...
  8. Replies
    31
    Views
    7,960

    Ohhh god, I'm so stupid. I've never considered...

    Ohhh god, I'm so stupid. I've never considered that function can be something else than void or int :o

    Although not everything is okey.


    case 1: system("cls");
    ...
  9. Replies
    31
    Views
    7,960

    So, in this example it will be? int ...

    So, in this example it will be?


    int
    DSWbalance(struct
    tree *root)
    {
    /*algorithm*/
    return root;
    }
  10. Replies
    31
    Views
    7,960

    I'm thinking of something like: struct...

    I'm thinking of something like:



    struct tree *mytree;
    /*code code*/
    head=DSWbalance(head);

    int DSWbalance(struct tree *root)
    {
  11. Replies
    31
    Views
    7,960

    What I have in mind is this: x=x+y (x is from now...

    What I have in mind is this: x=x+y (x is from now old x plus change)

    My line of thought goes like this:
    1. My tree points to sth, DSW changes what my tree point to -> DSW changes sth.
    2. Now I...
  12. Replies
    31
    Views
    7,960

    Understood but my mind cannot convert it into C....

    Understood but my mind cannot convert it into C. I think I'm to sure what's mine. My balance function should contain return balance()?
  13. Replies
    31
    Views
    7,960

    Ah that's my bad, I must have missclicked...

    Ah that's my bad, I must have missclicked something: that's what I have:


    int DSWbalance(two *p){
    struct tree *q;
    int i,k=0,nodecount;

    for(q=p,nodecount=0;q!=0;q=q->right)...
  14. Replies
    31
    Views
    7,960

    Yes I did, and it's confusing. All I need now...

    Yes I did, and it's confusing. All I need now from that article is vine_to_tree and tree_to_vine functions right? It's probably because of C/C++ differences, but there are some things I don't get....
  15. Replies
    31
    Views
    7,960

    int leftrotate(two **p) { struct tree *tmp;...

    int leftrotate(two **p) {
    struct tree *tmp;
    int data;
    if(*p==0 || (*p)->right==0)
    return 0; //no right node


    tmp=(*p)->right;
    (*p)->right=tmp->left; //move node
    tmp->left=(*p);
  16. Replies
    31
    Views
    7,960

    p->right=tmp->right; Right my bad, obviously,...

    p->right=tmp->right;
    Right my bad, obviously, there should be
    @edit: No, I'd rather kill myself than finish that project. Now rotations doesn't work...



    p->right=tmp->left;
    anduril462, that...
  17. Replies
    31
    Views
    7,960

    I must admit pointers are my pain in the ass. In...

    I must admit pointers are my pain in the ass. In my previous assignment I had like 1000 lines of code and all I did was avoiding pointers (I had 0 of them). But this time is no way to accomplish my...
  18. Replies
    31
    Views
    7,960

    I changed rotation a bit, so it's now: int...

    I changed rotation a bit, so it's now:


    int leftrotate(two *p) //rotates once
    { struct tree *tmp; int data;
    if(p==0 || p->right==0)
    return 0; //no right node
    ...
  19. Replies
    31
    Views
    7,960

    Yes I know it's not AVL. That was my first...

    Yes I know it's not AVL. That was my first concept (so i.e. comment You see it's what's left), but I changed my mind 'cause I'm can't manage AVL. All I want now is two simple binary trees and one of...
  20. Replies
    31
    Views
    7,960

    Hmm... when I do so, new root is 0, and height of...

    Hmm... when I do so, new root is 0, and height of the balanced tree is 0 as well, so still something is not correct right?
  21. Replies
    31
    Views
    7,960

    Ye, it's already changed to typedef struct...

    Ye, it's already changed to

    typedef struct tree
    {
    int val;
    struct tree *left;
    struct tree *right;
    }one,two;
  22. Replies
    31
    Views
    7,960

    Comparision of binary trees, balance.

    Hi! I got this little assignment on fundamentals of computer programming. Task is about creating two binary trees (simple binary tree and balanced one) and comparision of it. I've got a whole code....
  23. In another part of my code which You can't see,...

    In another part of my code which You can't see, there is a edition tool. It bases on strcmp(). Actually it's like line 55, but it goes this:


    printf("What is the tiitle of the book?\n");...
  24. Is there any idea to print it nicely?

    Is there any idea to print it nicely?
  25. There are unused variables because this is not a...

    There are unused variables because this is not a whole code, just 1/7.

    I'm aware that there is better way to do this, but my deadline is Monday, and with my C knowledge it would take a week to...
Results 1 to 25 of 29
Page 1 of 2 1 2