Goodbye,T-MAC!
Monday, May 7, 2007 12:32:58 AM
HongLiang
Thursday, May 10, 2007 12:41:11 PM
Monday, May 7, 2007 12:32:58 AM
Sunday, May 6, 2007 11:16:39 AM
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel label("<h1>hello, <font color=red>Qt!</font></h1>");
label.show();
return app.exec();
}
$qmake -project $qmake $make $./helloqt
Sunday, May 6, 2007 7:53:50 AM
void inorder(tree_pointer ptr)
{
if(ptr)
{
inorder(ptr->left_child);
printf("%d",ptr->data);
inorder(ptr->right_child);
}
}
#define MAX_STACK_SIZE 100
void iter_inorder(tree_pointer ptr)
{
int top = -1;
tree_pointer stack[MAX_STACK_SIZE];
for(; ; )
{
for(;node;node = node->left_child)
add(&top,node);
node = delete(&top);
if(!node)
break;
printf("%d",node->data);
node = node->right_child;
}
}
void level_order(tree_pointer ptr)
{
int front = rear = 0;
tree_pointor queue[MAX_QUEUE_SIZE];
if(!ptr)
return ; //空树
addq(front,&rear,ptr);
for(; ; )
{
ptr = deleteq(&front,rear);
if(ptr)
{
printf("%d",ptr->data);
if(ptr->left_child)
addq(front,&rear,ptr->left_child);
if(ptr->right_child)
addq(front,&rear,ptr->right_child);
}
else
break;
}
}
tree_pointer copy(tree_pointer original)
{
tree_pointer temp;
if(original)
{
temp = (tree_pointer)malloc(sizeof(node));
if(IS_FULL(temp))
{
fprintf("内存不足!\n");
return ;
}
temp->left_child = copy(original->left_child);
temp->right_child = copy(original->right_child);
temp->data = original->data;
return temp;
}
else
return NULL;
}
int equal(tree_pointer first,tree_pointer second)
{
return ((!first && !second) || (first && second &&
(first->data == second->data) &&
equal(first->left_child,second->left_child) &&
equal(first->right_child,second->right_child)));
}
对本站的速度感觉如何?
Total: 1 vote
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
|
| ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||
UBUNTU中文主页
UBUNTU官方网站