Actually, I understand now what to do. Sorry it took me some time to understand I had to use a structure
Type: Posts; User: Ramkiller1
Actually, I understand now what to do. Sorry it took me some time to understand I had to use a structure
Actually, I need to do it using open addressing double hashing. I would think the solution you gave was for using Chaining. My only problem right now is how to store a string data into the array.
Understood, one question that I am getting problem to understand.
I have to make a program to take words of a file and enter it into a hash table.
I have the solution to getting the words, I...
yip but oh well, whatever
Hi All,
I am currently making a hash table to hold strings.
My first guess were to add the ascii values but I was told that
hello and elhol would add up to be the same value (which is...
I made a great deal of changes. All I am trying to do now is get 12.50 8 in their variables.
I tried using
fseek(in,i,SEEK_SET);
fgets(l,sizeof(l),in);
sscanf(l,"%f...
Actually,
resule=strtok(name,"\"");
only got rid of the last " in every string. Like "15668942", turned into "15668942
It seems fscanf has the same issue also.
Thanks for the information. Should I use fscanf then?
I am trying to read from a file , that contains.
"15668942" "TOYOTA" "ENGINE PISTON" 12.50 8
"68465245" "NISSAN" "STARTER" 50.20 14
"14134455" "MITSUBISHI" "STEERING WHEEL" 20.00 0
"31457645"...
Thanks it worked, Guess I was thinking of it wrongly. Did I need to make a pointer then for this or just another array or are you showing me how to save space ?
Well i just did this
int * p;
p=(int *)malloc(max*sizeof(int)); //Allocate size of array
p=num;
sort1(p,n);
free(p);
Will Do
Any code come to mind?
But it did not work. It was used like a pointer
thats why i used temp=num;
Is there any solution to my issue then?
Hi All,
I would like to keep an array the same even after it is passed into a function. I am doing different sorts on the same data but when i try using
num=temp
HeapSort(temp,n);
Thanks for the help will try now
The function adjust is
typedef struct node{
char data[100];
node *left,*right;
char* n;
}Node, *NodePtr;
void adjust(NodePtr root, FILE * in2)
Hi Guys, Yes, I know I am not suppose to use FEOF to control a while loop but i need a suggestion of how to solve my issue.
while (!feof(in))
adjust(root, in);
In the function, a line of...
I got it thanks for your help guys.
NodePtr find2(NodePtr root, char test[])
{
while (root!=NULL)
{
if (root->left!=NULL)
When I was using watches, when it returned the correct value, it seems the function already had one more argument in its stack to finish overriding the past return statement.
Any Advise?
Well the code runs with no errors now but it always returns 0. When it finds the number and returns it, it still continues through the function and give me back 0 when it isnt found. Anyway to break...
I don't no exactly why I didint try it but I am still new to the ->data and ->left and right. Like exactly what it means. Sometimes i even put root.data thinking its the actually data in that root...
Thanks this worked. Stupid me forgot that.