yeah u were right. thanks for pointing out tt error...:)
Type: Posts; User: wind_lark
yeah u were right. thanks for pointing out tt 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()){
ya i think i need ur resource. whether to rotate the parent or grandparent, left or right first, i really have no idea....
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,...
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...
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...
i would like to know if...
i know how to write the functions for
void BST::LeftRotate(BSTNode* x) {}
&
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...
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...
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.
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,...
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...
#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);
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...
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...
thank you prelude and daved, you have made my hours of learning fruitful.
understood. thanks.
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,...
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...
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;...
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;
}
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 '>' '<'?
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);
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...
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);