2 Topics

Member Avatar for
Member Avatar for Hand

Hello. I compiled a basic GUI example written with Qt. When I run with valgrind, it tells that there is memory leak. It is stranger, because at each time I run the app, the number of malloc calls are different. Qt seems nondeterministic. [CODE] #include <QApplication> #include <QPushButton> int main(int …

Member Avatar for MastAvalons
0
189
Member Avatar for b1izzard

Binary search tree for strings. I tried my best to trace out the error but in vain Need help. [CODE] #include<stdio.h> #include<stdlib.h> #include<string.h> struct bstree { char keyword[25]; struct bstree *lnode,*rnode; }*root; void insert(struct bstree *new,struct bstree *old) { if((strcmp(new->keyword,old->keyword))<0 && old->lnode==NULL) { old->lnode=new; } else if((strcmp(new->keyword,old->keyword))<0 && old->lnode!=NULL) { …

Member Avatar for b1izzard
0
926

The End.