Search:

Type: Posts; User: wind_lark

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Thread: bus error

    by wind_lark
    Replies
    2
    Views
    1,140

    yeah u were right. thanks for pointing out tt...

    yeah u were right. thanks for pointing out tt error...:)
  2. Thread: bus error

    by wind_lark
    Replies
    2
    Views
    1,140

    bus error

    what causes the bus error in the hashtable implementation file?



    #include "Hashtable.h"

    // Enter your implementation here
    Hashtable::Hashtable(int m_that){
    m = m_that;
    //if (!T.empty()){
  3. Thread: avl tree

    by wind_lark
    Replies
    8
    Views
    1,726

    ya i think i need ur resource. whether to rotate...

    ya i think i need ur resource. whether to rotate the parent or grandparent, left or right first, i really have no idea....
  4. Thread: avl tree

    by wind_lark
    Replies
    8
    Views
    1,726

    so if rotation occurs, the parent and grandparent...

    so if rotation occurs, the parent and grandparent of the particular node changes.
    which nodes do i need to compare to? how do i determine left or right? i'm trying to create another function(node,...
  5. Thread: avl tree

    by wind_lark
    Replies
    8
    Views
    1,726

    assuming my Binary search tree i want to make has...

    assuming my Binary search tree i want to make has characteristics like a splay tree instead.
    then moving the desired node to the root node will greatly reduce the no. of steps the recursive function...
  6. Thread: avl tree

    by wind_lark
    Replies
    8
    Views
    1,726

    move node to root

    it's not just about return; in the function. i need to move the node to root. and rotate it properly to be the root of the tree. So if the node found is a left subtree of its parent, rotate right at...
  7. Thread: avl tree

    by wind_lark
    Replies
    8
    Views
    1,726

    avl tree

    i would like to know if...

    i know how to write the functions for


    void BST::LeftRotate(BSTNode* x) {}


    &
  8. Thread: classes+bool

    by wind_lark
    Replies
    12
    Views
    1,316

    struct within classes?

    thanks for ur wonderful insight, hk_mp5kpdw, sorry for the late reply. I'm not sure how to incorporate struct into a class, but i did get some clues on how to formulate the algorithm..will work on...
  9. Thread: classes+bool

    by wind_lark
    Replies
    12
    Views
    1,316

    seperate string

    thank you that solution worked perfectly well.:) if i had an optimal height and weight. how do i compare the 4 different variables together with a boolean function and sort using STL? bcos i figure...
  10. Thread: classes+bool

    by wind_lark
    Replies
    12
    Views
    1,316

    thank you, daved, swoopy and queatrix. i...

    thank you, daved, swoopy and queatrix. i understood the function 'is >> __' more and also had a successful compilation. but somehow i couldn't manage to cast the each_data into a string.
  11. Thread: classes+bool

    by wind_lark
    Replies
    12
    Views
    1,316

    classes+bool

    Hi guys, i ran into a problem in my simple class definition below which rendered me handicapped for hours...

    mainly, if i commented out the 2 lines of string input, the program works, but if not,...
  12. Replies
    5
    Views
    1,100

    wat is wrong?

    even before i got to extract the required...My above mentioned header and implementation code are all wrong...

    for each line of "File1-111(71%) File2-111(63%) 101"
    in the report output that i...
  13. Replies
    5
    Views
    1,100

    how to get rid of qn mark at end of output?

    #include <iostream>
    #include <fstream>
    using namespace std;

    int main () {
    char c, str[256];
    ifstream is;

    cout << "Enter the name of an existing text file: ";
    cin.get (str,256);
  14. Replies
    5
    Views
    1,100

    stuck

    i'm not clear about overloading.assuming that i could extract required info from a line, (line 1 for e.g.) , what function do i use to store the variables while i read the same variables for ( line...
  15. Replies
    5
    Views
    1,100

    need help...does anyone knows how to write header and implementation code for ADT?

    I'm working on a ADT. I'm writing a program to cin a software similarity report and to cout output on a number of statistics after running MOSS. So far, I've only been able to piece together a...
  16. Replies
    6
    Views
    1,658

    thank you

    thank you prelude and daved, you have made my hours of learning fruitful.
  17. Replies
    6
    Views
    1,658

    understood. thanks.

    understood. thanks.
  18. Replies
    6
    Views
    1,658

    initially i tot tt i need to make string of...

    initially i tot tt i need to make string of words(sentences) into an array tt's why put as char. but end up frustrated bcos only print 1st char of every word. now trying vectors for the 1st time,...
  19. Replies
    6
    Views
    1,658

    istringstream

    I have managed to tokenize my input lines. if i specifically want the 1st & last word & no. of words typed to be printed , how do i code it? I've already tried find_first_of(), but to no good...
  20. Replies
    16
    Views
    2,035

    thank you. when i changed i-- to i++ in the...

    thank you.

    when i changed i-- to i++ in the following code, because i wanted to see if "while(i--)" and "while(i++)" means while i=9 and while i=10.apparently i was wrong.


    int i= 10, j=1;...
  21. Replies
    16
    Views
    2,035

    for the following code int i=97,j=0; switch...

    for the following code


    int i=97,j=0;
    switch (i/98) {
    case 0: j +=5;
    case 1: j *=4;
    case 2: j /=3;
    default : j -=2;
    }
  22. Replies
    16
    Views
    2,035

    thank u kermit, that was a really detailed...

    thank u kermit, that was a really detailed explanation. i was confused because Unary preincrement/predecrement '++' '--' is of higher precedence than that of the relatinal operators '>' '<'?
  23. Replies
    16
    Views
    2,035

    i see what u mean.typecasting actually controls...

    i see what u mean.typecasting actually controls the memory used to return the value specified.
    thank u for clarifying.



    int i = 10,j=10,k=5;
    if (i<++j || i > --k)
    --k;
    printf("%i %i\n",j,k);
  24. Replies
    16
    Views
    2,035

    that really cleared my understanding of tt. thank...

    that really cleared my understanding of tt. thank u very much. so according to wat u say, i conclude that format specifiers in the printf statement actually override the cast operators (char) and...
  25. Replies
    16
    Views
    2,035

    i tried the following code int i=66; char...

    i tried the following code


    int i=66;
    char c='b';
    printf("%i %c\n",(char)i, (int)c);

    last line same as
    printf("%i %c\n",(int)i,(char)c);
Results 1 to 25 of 30
Page 1 of 2 1 2