Click here to Skip to main content
15,921,841 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
#include "iostream.h"
struct element
{
	int weight;
	int lchild,rchild,parent;
};
 int i1, i2;
void Select(element huffTree[]){
	int small,ssmall;
	small=ssmall=huffTree[0].weight;
		for(int i=1;huffTree[i].weight!=-1&&huffTree[i].parent!=-1;i++){
		if(huffTree[i].weight<small)>
			small=huffTree[i].weight;
		if(huffTree[i].weight<small&&hufftree[i].weight>small)
			ssmall=huffTree[i].weight;
		}
		i1=small;
		i2=ssmall;
}
void HuffmanTree(element huffTree[],int w[],int n){
	for(int i=0;i<2*n-1;i++){
		huffTree[i].lchild=-1;
		huffTree[i].parent=-1;
		huffTree[i].rchild=-1;
	}
	for(int k=0;k<n;k++)>
		huffTree[i].weight=w[i];
	for(int m=n;m<2*n-1;m++){
		Select(huffTree);
		huffTree[i1].parent=k;
		huffTree[i2].parent=k;
		huffTree[k].weight=huffTree[i2].weight+huffTree[i1].weight;
		huffTree[k].lchild=i1;
		huffTree[k].rchild=i2;
	}
}
void main(){
	int w[5]={1,2,3,4,5};
	element a[9];
	HuffmanTree(a,w,5);
	for(int i=0;i<9;i++)
		cout<<a[2].weight<<endl;

}





who can help me settle the problem? thanks!!!
Posted
Updated 30-Nov-10 18:06pm
v2
Comments
Abdul Quader Mamun 1-Dec-10 9:45am    
You need to configure your editor.

The error says that it couldn't load symbols for ntdll.dll, which means um... you don't have the symbols for the said dll.

Also, the error message has no relation to your code snippet. And you haven't even told what your problem is.
 
Share this answer
 
What problem? All it's saying is that you don't have the symbols installed for ntdll.dll. Not really unusual since you're not debugging at the kernel level.

Or, you may be trying to debug the Release version of the .EXE.
 
Share this answer
 
i meet the same problem today, have you solve it now?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900